iOS in app purchase - no products received

后端 未结 9 1534
感情败类
感情败类 2020-12-13 10:29

I\'m trying to add in-app purchase to my app, following the techniques described here :

Introduction to In-App Purchases in iOS 6 Tutorial

I\'ve added a prod

9条回答
  •  再見小時候
    2020-12-13 11:25

    I had a similar problem. I used code that was working in another app for IAPs so it should have been working, but I was getting an Invalid Product ID error and no results received. It turned out that it was a timing issue. I was trying to process the returned products before they'd been returned to the app, so the error was terminating the app before the products had time to be loaded! My program logic was:

    • User opens store view & IAP products are loaded
    • A UITableView is loaded with a list of the products (but from a locally held array)
    • The user clicks the buy button on a table cell - if this happens too quickly, the actual products haven't been returned yet - app crashes

    Answer for me was to build the table from the returned products (should have been obvious to me in the first place!) so the user couldn't continue until they had been loaded correctly

提交回复
热议问题