开发者

In-app purchase 'SKProductsRequest' failing to produce a successful response

开发者 https://www.devze.com 2023-02-16 20:44 出处:网络
We\'ve been trying to test in-app purchases in a sandbox environment, but fail to receive any data back from an SKProductsRequest. The callback

We've been trying to test in-app purchases in a sandbox environment, but fail to receive any data back from an SKProductsRequest. The callback

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

does get called but the response returns an empty array. Im testing this only for ipad, but both 3.2 and 4+ all seem to not get a response when I try this request.

I have read throughly through all intunes connect documentation so to tie the app on the iTunes connect with its inapp purchase items, and also all apple documentation on the SKProductsRequest object and the In App Purchase Programming Guide for help. I have tried resetting the certificates and starting all from scratch and followed the 'build for distribution' helper in the ios provisioning portal.

I have also built the app in all debug, release and distribution versions onto the device. I have watched and followed the WWDC2010 session 310 'App Publishing with iTunes Connect', but this is old as the enable inapp payments check button is no longer visible when creating app-ids in the provisioning portal site.

I have also mad开发者_开发知识库e sure that my code signing is correct and the program matches the right app-id to which the requested inapp purchases are signed-off with. (see attached, the bundleid matches the identifier in Xcode.

I have made sure that the ipad has signed out of any iTunes accounts when running the test app, and added test users on the iTunes Connect page to test with. Our iTunes Connect banking information is fully completed.

I have also checked many forums and this process seems to be a big grey area for many, I have exhausted all thought on this, I just cant seem to get a response back for any product id.

...can anyone help me?!! Thanks people!


I found myself in a similar situation. The problem was I was using the wrong "developer identity" to sign my (development) binary. Since I often work for other companies, I've always just used my "personal" developer certificate to sign debug builds. Since those are test builds, I don't care what the appid is nor what company it is associated with. However, I realized that it would be insecure for Apple to allow random developers to query details about purchases for appid's that are not associated with them.

Make an adhoc provision for the project, and make sure you are signing your test builds with a develeper certificate that is associated with that company. The sandbox interface into the appstore for iAP must be verifying this at runtime.


Your making a very common mistake I have made myself with in-app-purchases. You have taken all the right step but you are missing one step. You need to submit the in-app-purchase. You do this by clicking on the in-app-purchase in the section of iTunes Connect which you can find by going to Manage Applications -> your app -> manage in app purchases. In this detail view you click the "Submit In-App-Purchase" button in the upper right corner. This button may be grayed out. If it is you must upload a binary for your app. You can reject it right away if you want to. Once you have done that you can go back to the detail view and click the submit button.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号