j3k0 / cordova-plugin-purchase

In-App Purchase for Cordova on iOS, Android and Windows
https://purchase.cordova.fovea.cc
1.29k stars 529 forks source link

[IOS] - App hangs at splash screen after hard restart #1489

Closed davidemerritt closed 6 months ago

davidemerritt commented 6 months ago

Observed behavior

We just implemented this plugin for our capacitor application, and ran into a strange behavior. Everything works when the app is initially loaded - but when the app is force closed on iOS, the next time it is opened the app hangs at the splash screen. I haven't been able to get any logs or errors out of the app - it is crashing so early in the process.

We are initializing our CDVPurchase store at a specific route, and are not handling it at app initialization currently. We are trying out initializing at the app initialization - but this hasn't fixed the issue so far.

We would love some guidance on what to look for in debugging this or what could possibly be causing this. Thank you!

Expected behavior

The app does not

System Info

"cordova-plugin-purchase": "^13.8.6", "@capacitor/app": "^5.0.0",

davidemerritt commented 6 months ago

Figured out what was going on - if anyone else runs into this.

We had used CdvPurchase outside of the deviceReady callback (where it was intermittently undefined), and for some reason this only affected us after an app hard close.