iPhone In App Purchase - response.products are still empty?

送分小仙女□ 提交于 2019-11-28 04:20:15

Actually I do think you have to submit the binary for this to work.

You can set the release date to the distant future.

Another important step that is often overlooked is you need to make sure you have an iOS Paid Applications Contract setup which is located under the "Contracts, Tax, and Banking" section of iTunes connect. First you have to click on the request button, then you have to click on the 3 Set Up buttons (Contact Info, Bank Info, Tax Info)

Check whether there are invalid product id's.

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {

for (NSString *invalidProductId in response.invalidProductIdentifiers)
    {
        NSLog(@"Invalid product id: %@" , invalidProductId);
    }
}

If there are invalid product ids visit http://troybrant.net/blog/2010/01/invalid-product-ids/

It is a very comprehensive check-list for this problem.

Check if your Bundle Identifier (e.g. com.company.appname) in XCode matches the one in iTunes Connect.

You do not have to submit the binary for it to work.

Just delete the application on your device, and start it again from XCode. It fixed the problem for me.

No need to upload the binary, or wait for hours after creating the in-app purchase in iTunes Connect.

Thanks to alpere's answer I found out that I used the wrong product ID. It was not as I thought de.company.appname.PROFESSIONAL_LICENSE. Just using PROFESSIONAL_LICENSE in my case (without leading bundle id stuff) works :)

No need to upload binary for Sandbox testing of InAppPurchase. You just have to add InAppPurchase item in iTunesConnect and put it in "Ready to submit"(must) state only. If you submit it for review it will always give ou response.product empty.

Try to add a Free Subscription product. If it appears on the response then there is nothing wrong in your code. Since Free Subscription is the only type that doesn't require Agreements, Tax, and Banking and if it appears and the other types don't then it is a issue related to your contract.

In my case the reason was hosting of content by Apple turned on by mistake. The product was available only when I turned it off

In my case (MacOS) I was creating a test application (with the same bundle ID of main application). SKFetchRequest started returning product Ids for test application only after I set Bundle Name (Binary name) the same as in original application.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!