Question

I'm trying to add the in app purchase to my app, so after wondering around the interwebs I decided to go fot MKStoreKit, everything is now set, the project looks ok, files that should be on the server, are actually on the server and all this kind of stuff.

The mess kicks in when I run the app on the device and I push the test button "Buy". Firstly this is the result I get.

    2012-02-09 17:45:28.324 MyApp[7147:707] checking if com.my.company.testinapp.pack001 pack is purchased
    2012-02-09 17:45:30.814 MyApp[7147:707] Review request cannot be checked now: (null)
    2012-02-09 17:45:33.335 MyApp[7147:707] NSUbiquitousKeyValueStore error: com.my.company.inapp has no valid com.apple.developer.ubiquity-kvstore-identifier entitlement
    2012-02-09 17:45:33.370 MyApp[7147:707] Problem in iTunes connect configuration for product: com.my.company.testinapp.pack001
    2012-02-09 17:45:34.063 MyApp[7147:707] User cancelled transaction: <SKPaymentTransaction: 0x8c0fde0>
    2012-02-09 17:45:34.064 MyApp[7147:707] error: Error Domain=SKErrorDomain Code=3 "Cannot connect to iTunes Store" UserInfo=0x8c1f210 {NSLocalizedDescription=Cannot connect to iTunes Store}
    2012-02-09 17:45:34.065 MyApp[7147:707] User Cancelled Transaction
    2012-02-09 17:45:58:174 MyApp[7147:20747] finished networking setup

Let's make a step back to give a look to the sceanrio:

This is my invocation Code

- (IBAction)iap:(id)sender {
    NSLog(@"checking if %@ pack is purchased", kFeatureAId);
    if([MKStoreManager isFeaturePurchased:kFeatureAId]) { //unlock it
        NSLog(@"horray, you already purchased this item!");
    } else {
        [[MKStoreManager sharedManager] buyFeature:kFeatureAId
            onComplete:^(NSString* purchasedFeature) {
                NSLog(@"Purchased: %@", purchasedFeature);
            } onCancelled:^ {
                NSLog(@"User Cancelled Transaction");
        }];
    }
}

So basically I'm doing nothing than invoking the purchase of a test item.

This is the MKStoreConfig.h

#define kConsumableBaseFeatureId @"com.my.company.inapp"                        /* this is the bundle id */
#define kFeatureAId @"com.my.company.testinapp.pack001"                         /* this is the product id */
#define kConsumableFeatureBId @"com.my.company.testinapp.pack001.582046155"     /* this is the product id + product number */
#define FishBasket @"FishBasket"

#define SERVER_PRODUCT_MODEL 4
#define OWN_SERVER @"http://testings.company.my.com/inappscripts"
#define REVIEW_ALLOWED 1

#warning Shared Secret Missing Ignore this warning if you don't use auto-renewable subscriptions
#define kSharedSecret @"d43ecfa9d8b94facfbcfed1eca509dbe"

these infos shall suffice to make an analysis of my case scenario, if you need more details, just ask and I'll be glad to answer.

Hope someone could help me out with this. :) thanks in advance!

-k-

Was it helpful?

Solution

When you get the message, "Problem in iTunes connect configuration for product: com.my.company.testinapp.pack001", it means, your product is not configured properly on iTunes connect.

Is it already "Cleared for sale"?

Have you uploaded a screenshot and marked the state as "Developer approved"?

If this is your first app, have you submitted your banking and tax statements to Apple? - Strangely, IAP will fail if you cannot "legally" sell products. Your "Contracts, Tax and Banking" information should show a green tick on all three sections.

Hope that helps.

-- Mugunth (I wrote MKStoreKit)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top