简体   繁体   English

无效的产品标识符:如何验证iOS沙箱环境

[英]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. 我的应用程序(称为MyApp)的版本为v1.1,可在应用程序商店中购买。 I have created an In-App non-consumable purchase for 99 cents, tier 1 with a product ID we will call AdFree. 我已经创建了99美分的应用内非消耗性商品,第一级,其商品ID为AdFree。 Simple option to remove ads from the app. 从应用程序中删除广告的简单选项。

Product ID: "AdFree" 产品编号:“ AdFree”

App Bundle ID: "com.name.MyApp" 应用程序捆绑ID:“ com.name.MyApp”

I have setup my bank/tax info for iOS Paid Applications. 我已经为iOS付费应用程序设置了银行/税收信息。

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"? 我创建了一个配置文件配置文件进行测试,其显式应用ID为:com.name.MyApp.AdFree-如果产品ID为“ AdFree”,我的显式应用ID应为“ com.name.MyApp.AdFree”还是“ com.name.AdFree“?

I configured code signing in my project (Xcode) to use the new provisioning profile i created and downloaded. 我在项目(Xcode)中配置了代码签名,以使用我创建和下载的新配置文件。

On my phone, I am signed out from the iTunes Store. 在我的手机上,我已从iTunes Store注销。 I run my app and try to purchase AdFree, but I keep getting back "AdFree" as an invalid product identifier. 我运行我的应用程序并尝试购买AdFree,但是我仍然返回“ AdFree”作为无效的产品标识符。

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"; 在代码方面,我有一个静态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. 该项目面向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: 我的问题是iTunes Connect指出:

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. 目前,此应用内购买功能无法在沙盒环境中进行测试,因为您已选择将内容托管在Apple上,但尚未交付内容。 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). 我阅读了有关必须上传应用程序二进制文件然后拒绝它(不要这样做),添加IAP购买屏幕截图(不要那样做),使用IAP ID前面的应用程序ID或只是名称的所有信息。 IAP购买,而不是产品请求中的完整捆绑式ID(请勿这样做)。

This post finally solved my problem. 这篇文章终于解决了我的问题。 It just linked to this guide for uploading IAP purchase content from XCode and Application Loader. 它只是链接到本指南,用于从XCode和Application Loader上传IAP购买内容。 Once I uploaded the IAP content I built in XCode, my IAP status went to "processing content." 上传了我在XCode中构建的IAP内容后,我的IAP状态变为“正在处理内容”。 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. 花了3天的时间,但是我的IAP终于转移到了“等待屏幕截图”,并且我的沙箱构建现在运行良好。

Part of my problem was trying to follow Apple's documentation. 我的部分问题是尝试遵循Apple的文档。 Nearly every post linked to the Technical Note TN2259 , which should be good. 几乎每个帖子都链接到技术说明TN2259 ,这应该很好。 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. 但是,该文档将跳过有关在XCode中启动新项目以构建IAP购买内容以及在使用Apple托管IAP时通过Application Loader上载的部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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