We experience a strange behaviour of SKPaymentQueue under iOS-9 and iOS-9.0.1. We suspect that this is an iOS issue. This example is a minimal app-frame that demonstrates the SKPaymentQueue related issue. Download the example here.
This app requires one non-consumable IAP product with content hosted on Apple. App has only one button that starts the transaction/download process.
Download process is unexpectedly terminated when app is moved from the foreground to the background and then back to the foreground.
To reproduce the issue ...
Adapt this project to your dev. environment (set NON_CONSUMABLE_PRODUCT_WITH_HOSTED_CONTENT to your IAP product-id).
Create a test app (iTunes Connect).
Host a non-consumable IAP product (Application Loader).
Press the button "Get Product".
Wait until downloading starts.
Press Home button to resign the app.
(Re)Activate the app (touch the app icon).
SKPaymentQueue will eventually send one or two download update events.
!! SKPaymentQueue will send the paymentQueue(queue: SKPaymentQueue, removedTransactions transactions: [SKPaymentTransaction])` message to the observer.
!! Downloading is now terminated (no events).
Keep the app in the foreground while downloading.
Don't activate the app until the downloading is completed (at the system level), then activate the app.
Are you adding the background keys for your app?
You can set them in the info.plist or in capabilities...
https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW22
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With