psionicgames
psionicgames

Reputation: 237

iOS in-app purchases skproductrequest randomly getting no products returned

I have an odd problem on my hands with in-app purchases and any insight or help would be appreciated. I have in-app purchases setup for my app and have been using them regularly during testing; however, every once in a while the SKProductRequest will return with 0 products and won't load any products until I completely remove the app from the device and re-install it. Then everything shows up again and purchases can be made.

I'm not sure what is causing this problem. It may have something to do with the test environment for in-app purchases? I know everything is configured correctly seeing as I can normally use the in-app purchases without any errors. Thanks for any help.

Upvotes: 2

Views: 481

Answers (1)

Kemenaran
Kemenaran

Reputation: 1441

There may be several causes to Product Requests failing on a device. Basically, the StoreKit environment is very picky: if something in the app seems weird (like the code signature, or the embedded Provisioning Profile, or multiple app with the same profiles), it will not sent the request, or receive invalid data.

A common cause of silent failures is having multiple Provisioning Profiles installed for the same app. You can try to:

  1. Uninstall all Provisioning Profiles from your device (in Settings),
  2. Remove the app from the Device (to remove the embedded Provisioning Profile),
  3. Re-install the app.

I wrote a small blog post about this issue a few months ago, you may find more detailed informations there : http://kemenaran.winosx.com/?2011/12/02/180-ios-developer-what-to-do-if-in-app-purchases-stop-working

Upvotes: 2

Related Questions