I submitted an app with a single non-consumable IAP upgrade. It crashed all the Review Teams devices (but works wonderfully on my devices).
After I symbolicated the crash log (from the Review) the app crashed for them when my singleton Store handler (added as the Store observer in App Delegate didFinishLaunching) called requestStoreProductList (from my main view controller) and the delegate method productsRequest: didReceiveResponse: was called (in the custom object) but the response.products array was empty and when I tried to do anything with the array (e.g. objectAtIndex:0) the app crashes.
This happened to me during development as I had put the wrong identifier in iTunes Connect, but that was corrected, but then my test Sandbox user still wouldn't recognize the change and the failed delegate method showed the corrected identifier as "invalid". So, I deleted that test user and created a new one, and then everything worked (the product was returned). And it has worked for me ever since and I have NO crashes on my device or for any simulator device (not like the Review team).
So, this seems like something wrong internally in the iTunes Store with maybe the old (wrong) identifier hanging around??? And why will it work fine for me and not with the Review Team?
Thanks for any insights and solutions.
From time to time, App Reviews of in app purchase apps will fail when the SKProductsRequest is made to preflight (validate) the in app purchase identifiers. Specifically, the identifiers will not be returned in the response.products field, but instead in the response.invalidProductIdentifiers field.
I suspect that in your case, the app did not check that the identifiers were not returned in the response.products field, but instead assumed that they were valid and continued to the addPayment method. Such use can result in a crash.
The application should check the response result in the didReceiveResponse delegate method and either alert the user if the in app purchase identifiers are returned as invalid, or not offer them for purchase. A best iAP practice is to make the SKProductsRequest once, so as to verify that the identifier is valid and to obtain the current pricing and description information. There is no need to make this function all before making the addPayment call.
Now to the real issue here - it appears that the SKProductsRequest call failed in App Review. App Review will always review in app purchase apps on devices with a valid network connection. For whatever reason, the SKProductsRequest can fail in the App Review environment. It shouldn't, assuming that the in app purchase identifier is valid.
For anyone who is sure that the App Review failure resulted from a failure by SKProductsRequest to validate the in app purchase identifiers, one suggestion is that you submit a DTS incident. DTS will review the App Review rejection response and if the failure condition appears to be caused by an SKProductsRequest failure, DTS can request a second review of the app on the newly restarted device.
rich kubota - rkubota@apple.com
developer technical support CoreOS/Hardware/MFI