Question

I want to add in-app purchases to my app, but I can't make it work. I'm using MKStoreKit 4.2.

Here is the buying code:

- (IBAction)onPayButtonPressed:(id)sender {
    [[MKStoreManager sharedManager] buyFeature:@"com.flowrower.TestApp.0.99.item"
     onComplete:^(NSString* purchasedFeature, NSData* receiptData)
     {
         NSLog(@"Purchased: %@", purchasedFeature);
     }
     onCancelled:^
     {
        NSLog(@"Cancelled");
     }];


    NSLog (@"END");
}

In output I'm always getting "END" only. So buyFeature doesn't work at all.

  • Testing on iPhone 4S with iOS 6.0.
  • Using Provision Profile with In-App Purchases support.
  • There is Product ID "com.flowrower.TestApp.0.99.item" in iTunes Connect with status "Ready to submit"
  • This product is consumble and I have added it to MKSoreKitConfigs.plist
  • Everything's OK with Contacts, Bank and Taxes in iTunes Connect
  • Logged off from iTunes and App Store on my device.
  • Getting this message at app start: "NSUbiquitousKeyValueStore error: user.TestApp has no valid com.apple.developer.ubiquity-kvstore-identifier entitlement". I don't know is it related or not.
Was it helpful?

Solution 2

The problem was with iOS 6. 12 days ago new version of MKStoreKit released and it work like a charm in iOS 6. Thanks guys.

OTHER TIPS

if its not approved, you need to test in the sandbox. I don't know MKStoreKit but I think you need an adhoc certificate!?

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