3
我花了一整天的時間嘗試在應用程序中購買應用程序,並試圖使其工作,結果產生了RMStore的「未知產品標識符」響應。我已經試過各種這份名單上:http://troybrant.net/blog/2010/01/invalid-product-ids/RMStore In App Purchase購買未知產品標識
我的代碼是:
if ([RMStore canMakePayments]) {
_products = @[@"com.afterdark.afterdark.usersaleslisting"];
[[RMStore defaultStore] requestProducts:[NSSet setWithArray:_products] success:^(NSArray *products, NSArray *invalidProductIdentifiers) {
NSLog(@"Request Success");
NSString *productID = _products[0];
SKProduct *product = [[RMStore defaultStore] productForIdentifier:productID];
NSLog(@"IAP ID: %@",productID);
NSLog(@"IAP TITLE: %@",product.localizedTitle);
NSLog(@"IAP PRICE: %@",[RMStore localizedPriceOfProduct:product]);
[[RMStore defaultStore] addPayment:productID success:^(SKPaymentTransaction *transaction) {
NSLog(@"Payment Succes");
} failure:^(SKPaymentTransaction *transaction, NSError *error) {
NSLog(@"Payment Failed: %@",error.localizedDescription);
}];
} failure:^(NSError *error) {
NSLog(@"Request Failed: %@",error.localizedDescription);
}];
}
iTunes Connect中 - 在應用內購買:
的Xcode - 在應用內購買能力
我已經完全沒有想法如何讓這個工作,任何人有任何想法?任何幫助將不勝感激。先謝謝你。