Something has broken when doing a non-consumable in-app purchase in iOS16 when compiling with Xcode 14.0.1. The exact same code worked fine in previous versions, but I cannot determine the cause of this new strangeness.
The symptom is that the purchase of our app cannot be restored in any way. This problem seems to be only with the actual App Store. Restoring purchases works perfectly on iOS 15.7 and 16.0.2 when testing either in a sandbox environment or the new Xcode environment, but when dealing with the actual App Store, no dice. The result with the App Store is that there is no response whatsoever after initiating SKPaymentQueue.default().restoreCompletedTransactions(). The transaction.transactionState function never returns anything at all, not even a .failed. If I try and re-purchase the app, then transaction.transactionState immediately returns a .purchasing value, but then nothing completes from there. So there appears to be no way to restore or repurchase it for free even.
Here is more detail using the same code that has worked fine for quite some time, up until now:
- the version we have on the App Store currently restores fine on both iOS 15.7 or 16.0.2 (unsure what Xcode version I used to archive and distribute this version initially…could be Xcode 13.*) - testing in the sandbox or Xcode test environment, the app restores fine on iOS 15.7 AND on iOS 16.0.2 - uploading and using TestFlight, the app restores fine on iOS 15.7, but does NOT restore on iOS 16.0.1 or 16.0.2
This was also happening on Xcode 14 before I updated to 14.0.1.
Things I’ve tried to help narrow it down, but to no avail:
- Removing and reinstalling Xcode 14.0.1 - Regenerating the certs and provisioning profiles on my MacBook - Multiple iOS configs across four devices to try and find a logical pattern (details above…)
I could use some guidance on this, as it seems that releasing a new version will likely not function on iOS16.0.X when using Xcode 14.0.1 until I solve this. I’m dead in the water.