解决应用内购买的无效产品 ID 问题吗?
这是“的后续问题使用 MKStoreKit 购买应用程序失败:“产品的 iTunes 连接配置出现问题:xxx”
我遇到了类似的问题,并尝试使用和不使用 MKStoreKit 进行操作,并收到类似的消息。
清单
感谢:http:// /troybrant.net/blog/2010/01/invalid-product-ids/
您是否为您的应用 ID 启用了应用内购买?
是
您检查过吗您的产品已批准销售?
是
您是否已提交(并可选择拒绝)您的应用程序二进制文件?
是
您的项目的 .plist 捆绑包 ID 与您的应用程序 ID 匹配吗? >
是
您是否为新的 App ID 生成并安装了新的配置文件?
是
您是否已将您的项目配置为使用此新的配置文件进行代码签名?
是
您正在为 iPhone 进行构建吗操作系统 3.0 或更高版本?
是的。 iOS4.2及以上版本。
您在发出 SKProductRequest 时是否使用完整的产品 ID?
是。也只是产品 ID 本身,没有反向域
将产品添加到 iTunes Connect 后您是否已经等待了几个小时?
是的。它显示“正在等待审核”,并且在过去 4-5 天里一直在等待审核。
您的银行详细信息在 iTunes Connect 上有效吗?
否。这是一个客户项目,我只是测试它是否有效。我需要银行详细信息来测试它吗?
编辑:我现在已经改变了这一点。但我不明白为什么我需要这样做只是为了测试沙箱。
您是否尝试过从设备中删除该应用程序并重新安装?
是
您的设备是否已越狱?
否
应用程序符号正确
我见过使用的一些示例这个符号: com.domain.APP_ID.PRODUCT_TO_BUY
但其他人使用 com.domain.PRODUCT_TO_BUY
哪个是正确的?
在我的代码中,我尝试使用完整的符号和产品 ID 本身,但仍然遇到“无效的产品 ID”的相同问题。
开发人员拒绝
App Bundle(发布)位于 iTunes Connect 上,我已“开发人员拒绝”该捆绑包。
图片:
等待审核?
在我的应用内购买中,我有 1 个产品,自动续订订阅。已获准出售;然而,它正在“等待审核”并且没有亮起绿灯。
图片:
我在大约 4-5 天前创建了这个,但它仍然标记为“等待审核”?
我想知道我的应用程序是否已被“开发人员拒绝”,这是否会对自动续订订阅的“等待审核”产生影响?
我没有更改此项目中的任何内容。
根据各种文章我必须等待24-48小时才能使用它?
但是我是否需要等待它被接受或亮起绿灯才能在我的测试中使用它?
银行详细信息
我尚未填写任何银行详细信息,因为这是面向客户的应用程序 - 我需要填写银行详细信息才能继续测试吗?
根据这些文档: http://developer.apple.com/ library/ios/#technotes/tn2259/_index.html 需要银行详细信息吗?
运行应用程序之前,我是否需要在设备上使用测试帐户登录 iTunes?
我想知道是否有人可以澄清这些问题?也许就像等待应用内购买“绿灯亮起”一样简单,或者也许我错过了一个步骤?
注意:无论我使用 MKStoreKit 还是使用下面的代码,都会发生这种情况。
谢谢。
我的代码(这是非 MKStoreKit 版本)
#define kMySubscriptionFeature @"uk.co.samplewebsite.myappproject.sub1"
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.title = @"Manage Subscriptions";
if ([SKPaymentQueue canMakePayments])
{
// Display a store to the user.
//[MKStoreManager sharedManager];
//NSLog(@"purhcasable = %@", [[MKStoreManager sharedManager] purchasableObjectsDescription] );
[self requestProUpgradeProductData];
}
else
{
// Warn the user that purchases are disabled.
NSString *message = @"In-app purchases are disabled. Please review your settings";
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
[alertView release];
} // end if
}
#pragma mark - StoreKit Delegate
- (void) requestProductData
{
SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject:kMySubscriptionFeature]];
request.delegate = self;
[request start];
}
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
NSArray *myProduct = [[NSArray alloc] initWithArray:response.products];
for(SKProduct *item in myProduct)
{
NSLog(@"Product title: %@" , item.localizedTitle);
NSLog(@"Product description: %@" , item.localizedDescription);
NSLog(@"Product price: %@" , item.price);
NSLog(@"Product id: %@" , item.productIdentifier);
}
for (NSString *invalidProductId in response.invalidProductIdentifiers)
{
NSLog(@"Problem in iTunes connect configuration for product: %@" , invalidProductId);
}
[myProduct release];
// populate UI
[request autorelease];
}
编辑:
作为故障保护,我添加了银行详细信息以防万一,但我不明白为什么这会导致问题。
我还确保我上传并拒绝了应用程序发布包,而不是临时包;虽然我不知道这是否有什么区别。
This is a follow-up question to "In app purchases with MKStoreKit failing: “Problem in iTunes connect configuration for product: xxx"
I am having a similar issue and have tried to do both with and without MKStoreKit and get a similar message.
Check-list
With thanks to: http://troybrant.net/blog/2010/01/invalid-product-ids/
Have you enabled In-App Purchases for your App ID?
YES
Have you checked Cleared for Sale for your product?
YES
Have you submitted (and optionally rejected) your application binary?
YES
Does your project’s .plist Bundle ID match your App ID?
YES
Have you generated and installed a new provisioning profile for the new App ID?
YES
Have you configured your project to code sign using this new provisioning profile?
YES
Are you building for iPhone OS 3.0 or above?
YES. iOS4.2 and up.
Are you using the full product ID when when making an SKProductRequest?
YES. Also just the product ID itself without the reverse domain
Have you waited several hours since adding your product to iTunes Connect?
YES. It says "Waiting for review" and has done for the past 4-5 days
Are your bank details active on iTunes Connect?
NO. It is a client project and am only testing to see if it is working. Do I need bank details to test it?
EDIT: I have changed this now. But I do not see why I need to do this just to test sandboxing.
Have you tried deleting the app from your device and reinstalling?
YES
Is your device jailbroken?
NO
App notation is correct
Some examples I have seen use this notation:
com.domain.APP_ID.PRODUCT_TO_BUY
But others use
com.domain.PRODUCT_TO_BUY
Which is right?
In my code I have attempted using the full notation and just the product ID itself but still get the same problem of "Invalid product id".
Developer rejected
App Bundle (Release) is on iTunes Connect and I have "developer rejected" the bundle.
Picture:
Waiting for review?
In my in-app purchases I have the 1 product, an auto-renewable subscription. It is cleared for sale; it is however "Waiting for review" and is not green-lit.
Picture:
I created this almost 4-5 days ago and its still flagged as "Waiting for review"??
I am wondering if my app has been "developer rejected" whether this has an impact on "Waiting for review" on an auto-renewable subscription?
I have not changed anything in this item.
According to the various articles I have to wait 24-48 hours before I can use it?
But do I need to wait for this to be accepted or green-lit before I can use it in my testing?
Bank details
I have not filled in any bank details because this is an app for a client -- Do I need to fill in bank details before I can continue testing it?
According to these docs: http://developer.apple.com/library/ios/#technotes/tn2259/_index.html bank details are required?
Do I need to be logged into iTunes on my device under a test account before running the app?
I am wondering if someone can clarify these issues? Maybe its just as simple as waiting for the in-app purchase to be "green lit", or perhaps I've missed a step?
Note: This happens regardless of whether I use MKStoreKit or use the code that follows.
Thanks.
My code (this is the non MKStoreKit version)
#define kMySubscriptionFeature @"uk.co.samplewebsite.myappproject.sub1"
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.title = @"Manage Subscriptions";
if ([SKPaymentQueue canMakePayments])
{
// Display a store to the user.
//[MKStoreManager sharedManager];
//NSLog(@"purhcasable = %@", [[MKStoreManager sharedManager] purchasableObjectsDescription] );
[self requestProUpgradeProductData];
}
else
{
// Warn the user that purchases are disabled.
NSString *message = @"In-app purchases are disabled. Please review your settings";
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
[alertView release];
} // end if
}
#pragma mark - StoreKit Delegate
- (void) requestProductData
{
SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject:kMySubscriptionFeature]];
request.delegate = self;
[request start];
}
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
NSArray *myProduct = [[NSArray alloc] initWithArray:response.products];
for(SKProduct *item in myProduct)
{
NSLog(@"Product title: %@" , item.localizedTitle);
NSLog(@"Product description: %@" , item.localizedDescription);
NSLog(@"Product price: %@" , item.price);
NSLog(@"Product id: %@" , item.productIdentifier);
}
for (NSString *invalidProductId in response.invalidProductIdentifiers)
{
NSLog(@"Problem in iTunes connect configuration for product: %@" , invalidProductId);
}
[myProduct release];
// populate UI
[request autorelease];
}
Edit:
As a failsafe, I've added bank details just in case, but I don't see why this would cause an issue.
I've also made sure I uploaded and rejected the app release bundle and not the adhoc one; though I do not know if this makes any difference.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
经过 2 天的等待,新的应用程序 ID、配置文件等为我解决了这个问题。
为什么文档说使用完整的 com.iap.isrubbish 语法?
感谢您的帮助
After 2 days of waiting, new app ids, profiles, etc. this fixed it for me..
Why do the docs say to use the full com.iap.isrubbish syntax?
Thanks for your help
我想我现在已经做到了。我将进行一些测试来确定。
这目前还不会被接受;我正在使用不同的 storekit 框架运行一些测试。
我的输出:
这就是我所做的。
我添加了我的银行详细信息。但我仍然不认为这与此有任何关系。
注意。该应用程序的应用内购买仍然是“等待审核”,我得到了上述输出。
我替换了:
#define kMySubscriptionFeature @"uk.co.somesite.someapp.sub1"
替换为:
我将使用 MKStoreKit 和其他框架运行一些测试,看看是否可以。
我使用的代码如下,出于安全原因进行了编辑:
.h 文件
.m 文件
I think I've done it now. I'm going to run some tests just to make sure.
This is not going to be accepted just yet; I am running some tests with different storekit frameworks.
My output:
Here's what I did.
I added my bank details. I still do not think this has anything to do with it though.
Note. The app's in-app purchase is still "Waiting for review" and I got the above output.
I replaced:
#define kMySubscriptionFeature @"uk.co.somesite.someapp.sub1"
with:
I am going to run some tests with MKStoreKit and with other frameworks to see if it is okay.
The code I used is below, edited for security reasons:
.h file
.m file
我刚刚发现我在创建应用内购买时交换了产品 ID 和参考名称,因此在我的例子中,我使用了错误的字符串来尝试查找产品...很难发现。
I just found out that I swapped the product ID and the reference name when I created the in app purchase, so in my case I was using the wrong string to try and find the Product... Hard to spot.
当我开始在 iTunes 连接消息中看到问题时,我正在使用应用程序内购买测试现有的功能齐全的应用程序的最新版本,以确保功能仍然按预期工作。我的问题是(我忘记了)MKStoreKit 将购买的事实存储在我的各种设备的钥匙串上,因此即使我使用新的用户帐户,我的钥匙串也会将设备注册为已购买的设备。
MKStoreManager 中的 [self removeAllKeychainData] 解决了这个问题。
希望这可以减轻某人的挫败感。
I was testing the newest version of my existing, fully-functioning app with in app-purchase to ensure the functionality was still working as expected, when I began to seeing the problems in iTunes connect message. My problem was (I forgot) that MKStoreKit stored the fact of the purchase on my various devices' keychain, so even though I was using a new user account, my keychain was registering the device as already purchased.
[self removeAllKeychainData] from within MKStoreManager fixed the trouble.
Hope this saves someone some frustration.
我的问题是,我使用真实的 Apple ID 登录设备。然后注销(iPhone->设置->App Store->我的ID->注销)
然后再次部署,万岁,它成功了。
感谢网络上的大家。
My issue was, I had logged in on device using real apple id. Then signed out ( Iphone-> Settings -> App Store -> My ID-> Sign Out)
Then deployed again, and hurray it worked.
Thanks everyone on web.