Reputation: 688
I have spent all day trying to get an in app purchase to work in my app, and everything that I have tried to make it work results in a 'Unkown Product Identifier' response from RMStore. I have tried everything on this list: http://troybrant.net/blog/2010/01/invalid-product-ids/
My Code is:
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 - In App Purchases:
Xcode - In App Purchases Capability
I have completely run out of ideas of how to get this to work, anyone have any ideas? Any help will be appreciated. Thank you in advance.
Upvotes: 3
Views: 2047
Reputation: 688
So, I have finally got this working. I contacted apple and it turns out the only reason it wasn't working is because something had gone wrong on their servers when I created the IAP in iTunes Connect, they promptly resolved the issue.
Upvotes: 0