简体   繁体   中英

Invalid Product Identifier: How do I verify iOS sandbox environment

Trying to figure this out and following Apple's docs. Here is what I have done, hopefully someone can help point out where I screwed up. My app, we'll call it MyApp, is at v1.1 and for sale in the app store. I have created an In-App non-consumable purchase for 99 cents, tier 1 with a product ID we will call AdFree. Simple option to remove ads from the app.

Product ID: "AdFree"

App Bundle ID: "com.name.MyApp"

I have setup my bank/tax info for iOS Paid Applications.

I created a provisioning profile to test this, with the explicit App ID: com.name.MyApp.AdFree - if the Product ID is "AdFree", should my explicit App ID be "com.name.MyApp.AdFree" or just "com.name.AdFree"?

I configured code signing in my project (Xcode) to use the new provisioning profile i created and downloaded.

On my phone, I am signed out from the iTunes Store. I run my app and try to purchase AdFree, but I keep getting back "AdFree" as an invalid product identifier.

Hoping someone here can point out something I missed or tip me off to some other related problem.

Code wise, I have a static NSString *productID = @"AdFree"; setup and I do the following when in the option to purchase Ad Free:

NSSet *productSet = [NSSet setWithObjects:productID, nil];

SKProductsRequest *request = [[SKProductsRequest alloc]
        initWithProductIdentifiers:productSet];
request.delegate = self;
[request start];

This project is targeting iOS 7.

Thanks for your time...

Well, after being frustrated and side tracked, I finally got to work on this again. I was following old suggestions and found nothing recent that helped...until last Friday. My problem was where iTunes Connect stated:

This In-App Purchase is not currently available for testing in the sandbox environment because you have chosen to host your content with Apple, but have not delivered your content. Upload your content to test this In-App Purchase in sandbox.

So my product requests came back invalid. I read everything about having to upload an app binary and then rejecting it (don't do that), adding an IAP purchase screenshot (don't do that), using the app id in front of the IAP id or just the name of the IAP purchase and not the full bundle-like id in your product requests (don't do that).

This post finally solved my problem. It just linked to this guide for uploading IAP purchase content from XCode and Application Loader. Once I uploaded the IAP content I built in XCode, my IAP status went to "processing content." A lot of posts say wait anywhere from a couple of hours to a day. It took 3 days but my IAP finally moved to "waiting for screenshot" and my sandbox build now works great.

Part of my problem was trying to follow Apple's documentation. Nearly every post linked to the Technical Note TN2259 , which should be good. However, that doc complete skips over the part about starting a new project in XCode to build your IAP purchase content and uploading with Application Loader when you use Apple to host your IAP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM