我在请求产品信息时遇到了无效标识符问题
我做了以下事情:
我已将我的应用程序添加到 iTunes 连接,并且捆绑标识符与程序门户中的那个匹配。
我已经在程序门户中为应用程序 ID 启用了应用程序购买,并为此创建了配置文件并安装在设备上。
使用产品标识符、价格和名称创建测试帐户。
我已将以下代码包含在我的项目中
NSString *str = [[NSString alloc] initWithFormat:@"//Same as the Product Id displayed in Itunes Connect//"]; SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:str]]; request.delegate = self; [request start]; } - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response{ NSArray *myProduct = response.products; NSArray *invalidProdId = response.invalidProductIdentifiers; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"product" message:[myProduct objectAtIndex:0] delegate:nil cancelButtonTitle:@"purchse" otherButtonTitles:@"cancel"]; [alert show]; [alert release]; [request autorelease]; }
但我的 productid 无效。
如果有人有任何想法,请帮助我!