iPhone In-App Purchase Store Kit error -1003 “Cannot connect to iTunes Store”

后端 未结 20 2740
旧巷少年郎
旧巷少年郎 2020-11-29 02:49

I\'ve been working on adding in-app purchases and was able to create and test in-app purchases using Store Kit (yay!). During testing, I exercised my app in a way which cau

20条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 03:17

    I had two problems that caused this:

    1) I had copied the IAP code from a different (working) app but had missed setting up my observer:

    observer = [[IAPHelper alloc] init]; [[SKPaymentQueue defaultQueue] addTransactionObserver:observer];

    2) I was logged in to iTunes in the settings of my device. You can only use a test user in the sandbox - I logged out and it worked again.

提交回复
热议问题