I have some troubles with in app purchasing. I hope you can help me.
What I have done:
* I've uploaded my binaries to iTunes Connect.
* I've created products in iTunes Connect.
Product name - > Product ids:
1) TestProduct1 -> TestProduct1
2) TestProduct2 -> PrefixTestProduct2
3) com.MyCompanyName.MyAppName.ProductId_5 -> com.MyCompanyName.MyAppName.ProductId_5
4) com.MyCompanyName.MyAppName.ProductId_4 -> com.MyCompanyName.MyAppName.ProductId_4
5) com.MyCompanyName.MyAppName.ProductId_3 -> com.MyCompanyName.MyAppName.ProductId_3
6) com.MyCompanyName.MyAppName.ProductId_2 -> com.MyCompanyName.MyAppName.ProductId_2
7) com.MyCompanyName.MyAppName.ProductId_1 -> com.MyCompanyName.MyAppName.ProductId_1
* All my products have status "Ready to Submit"
* All my products have mark "Cleared for Sale"
* My app in iTunes Connect has state "Prepare for Submission"
* I assign may uploaded binnary app to Build in in iTunes Connect.
* I connect all products to my app in iTunes Connect
* WI-FI on my device is turned on
* I create some Sandbox Testers
* I enabled In-App Purchases for my App ID.
* My project’s .plist Bundle ID match my App ID
* I generated and installed a new provisioning profile for the appropriate App ID
* Project code sign uses appropriate provisioning profile
* I build for ios 8.0
* I've tired to use the full product ID (com.MyCompanyName.MyAppName.ProductId_5) when making an SKProductRequest and also short version (ProductId_5)
* I've waited several days since adding my product to iTunes Connect
* I'v tried deleting the app from my device and reinstalling (with cleaning and rebuild)
* My device doesn't jailbroken
* I sign out in iTunes & App Store on my device
What I have not done:
* My bank details is not active on iTunes Connect? ("Contracts, Tax, and Banking Information") because I don't have them yet. But how I have red in apple documentation it is not necessary for sandbox testing.
I'm trying to receive product information from itunes with this code:
-(void)requestProUpgradeProductData
{
if ([SKPaymentQueue canMakePayments])
{
// Display a store to the user.
NSLog(@"Display a store to the user.");
}
else
{
// Warn the user that purchases are disabled.
NSLog(@"Warn the user that purchases are disabled.");
}
NSSet* productIdentifiers = [NSSet setWithObjects:
@"TestProduct1",
@"TestProduct2",
@"PrefixTestProduct2",
@"com.MyCompanyName.MyAppName.ProductId_1",
@"com.MyCompanyName.MyAppName.ProductId_2",
@"com.MyCompanyName.MyAppName.ProductId_3",
@"com.MyCompanyName.MyAppName.ProductId_4",
@"com.MyCompanyName.MyAppName.ProductId_5",
@"ProductId_1",
@"ProductId_2",
@"ProductId_3",
@"ProductId_4",
@"ProductId_5",
nil];
productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
productsRequest.delegate = self;
[productsRequest start];
}
-(void)productsRequest:(SKProductsRequest*) request didReceiveResponse:(SKProductsResponse*) response
{
NSArray* products = response.products;
proUpgradeProduct = [products count] >= 1 ? [products firstObject] : nil;
if (proUpgradeProduct)
{
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);
}
[[NSNotificationCenter defaultCenter] postNotificationName:kInAppPurchaseManagerProductsFetchedNotification object:self userInfo:nil];
}
But unfortunately I receive respond with all my products in invalidProductIdentifiers.