English 中文(简体)
I cannot get in app purchase test to work
原标题:

I have had zero success with in app purchase. I have submitted the free app binary, and then rejected the binary. I have added the test product. I have approved the test product TAP001.

I have followed the code examples to no avail. I do a SKProducts request using both "com.companyname.appid.TAP001" and just "TAP001"

Regardless, I get an empty response.products and response.invalidProductIdentifiers with the product string I sent.

I created a test user, but seeing how I cannot get any product info, the test user doesn t really come into play yet.

Can in app purchase be tested in debug or release builds? Or does it have to be a distribution?

Must one have a fully accepted app in the app store prior to testing in app purchase?

I am simply trying to test the process out and I do not have an actual app yet. I went as far as to fill out all the bank and tax information. I have followed the steps in the app docs but clearly I have something wrong or missing.

Thanks

最佳回答

I just got it to work. I used only "TAP001" for a product instead of "com.companyname.appid.TAP001". and I got product information back.

I feel dumb but I know have tried "TAP001" in the past with no success but I have tried so many things prior to this that I must have had some other information wrong a the time I did.

For those who are struggling with this issue, I can say:

  • Your app does not need to be live in the store.
  • You do need an app in the App store submission. Reject the binary after uploading it.
  • Testing your app should work in Release or Debug modes
  • You do need an in app product "Cleared for sale"
  • Your product request only needs to contain the product id(s)

Here is an example:

- (IBAction)buyButton1Click:(id)sender{
    NSSet *productList = [NSSet setWithObjects:@"TAP001", @"TAP002", nil];

    SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:productList];
    request.delegate = self;
    [request start];
    }
问题回答

According to Apple s itunes connect FAQ, you need to create a test user in order to use the itunes store sandbox environment.

That being said, even after creating such a user and setting my iphone to use that user, I am still experiencing the same issue that you report: all products are "invalid" according to the store kit API.

I ll update this post when I figure it out.

I ve also heard that some times, you need to wait several hours before the in-app item goes through apple sand box servers, so it could be the reason it doesn t work yet. I m in that case, i m going to wait 24 hours to see, i ll let you know !!!

So: Imagine an extremely complicated and convoluted set of rules for how to test in app purchases. Now make it ten times more complicated. That is apple s solution. :)

You ll need to read the itunes connect developer guide, and probably also the In App Purchase guide. The short answer is that you ll need a special test account and you ll also need to use it in a very particular way if you want to test your in app purchase.

Good luck!





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签