iphone – 在应用程序购买沙箱问题
目前我正在开发iOS应用程序,需要In App Purchase.
和许多教程一样(如:http://www.raywenderlich.com/2797/introduction-to-in-app-purchases).我在iTunesConnect中创建了新的应用程序,上传了二进制文件并拒绝了它.之后,我在应用购买产品中添加了一些.在下一步中,我将Storekit添加到我的Xcode项目中,之后我在UIViewController中编写了这段代码: - (void)buyPressed { SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObjects: @"com.mycompany.appliaction_name.levelpack",nil]]; request.delegate = self; [request start]; NSLog(@"request started"); } - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { NSArray *products = response.products; for (int i=0; i<[products count]; i++) { SKProduct *proUpgradeProduct = [products objectAtIndex:i]; if (proUpgradeProduct) { NSLog(@"Valid product id: %@",proUpgradeProduct.price); NSLog(@"Product title: %@",proUpgradeProduct.localizedTitle); NSLog(@"Product description: %@",proUpgradeProduct.localizedDescription); NSLog(@"Product price: %@",proUpgradeProduct.price); NSLog(@"Product id: %@",proUpgradeProduct.productIdentifier); } } for (NSString *invalidProductId in response.invalidProductIdentifiers) { NSLog(@"Invalid product id: %@",invalidProductId); UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Apple connection error!" message:nil delegate:self cancelButtonTitle:@"CLOSE" otherButtonTitles:nil]; [myAlertView show]; [myAlertView release]; } } 我仍然收到所有我的应用程序产品都有无效产品ID的信息.今天我发现了这个:http://developer.apple.com/library/ios/#technotes/tn2259/_index.html 还有一件重要的事情: 所以我必须再次在iTunes中创建新的应用程序,或者我应该在没有应用程序购买的情况下构建和提交我的应用程序,当应用程序出现在iTunes中时,在应用程序购买中开发新版本? 谢谢你的回答! 解决方法
因此,请确保您没有使用被拒绝的相同产品标识符
如果您提交申请并且二进制文件因任何原因被拒绝,应用程序内购买可能会停止在沙箱中正常运行. Apple指出,恢复此功能的唯一方法是重新提交没有IAP功能的应用程序二进制文件,并首先获得批准(但不一定是已发布). 看看我的另一个相关[ANSWER] (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |