Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 358
dredful Avatar asked Nov 22 '09 23:11

dredful


1 Answers

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];
    }
like image 149
dredful Avatar answered Nov 07 '22 12:11

dredful