cyclingIsBetter
cyclingIsBetter

Reputation: 17591

in app purchase "Error Domain=SKErrorDomain Code=0"

In my app I have an in-app-purchase where I allow to purchase some items. (with mkstorekit) A think that I notice in iOS 7 is this: if In general setting of my iPhone I'm logged with my Apple id and I proceed to purchase an item I have an error "Error Domain=SKErrorDomain Code=0" and the code finish in "canceled" block. Then I logout from my apple id, I start again the app and when I must purchase an item it ask me id and password and its correct (naturally I insert a tester user data that I created in iTunes Connect) At this time I stop my app and in my general setting is stored the tester user, then I start again my app and when I must purchase an item I have not the problem that I had with my personal apple id and it work fine. In iOS 6 it didn't happen because if I was logged with my apple id in general settings and I tried to purchase an item, it showed me my apple id and asked me to insert the password (naturally it didn't work)

Finally this is not a big problem, I solve it because I used my tester account, but when I release my app in App Store can I have the same problem? If an user is logged in general setting the mkstorekit sto purchase and go in "canceled" block?

I show the method where is the cancel block:

- (void)purchaseFeature:(NSString *)productID

    {
        [[MKStoreManager sharedManager] buyFeature:productID
                                        onComplete:^(NSString* purchasedFeature,
                                                     NSData* purchasedReceipt,
                                                     NSArray* availableDownloads)
         {
             [HUD hide:YES];

    /*** CODE TO OPEN VIEW IF THE PURCHASE IS DONE ****/

}
                                       onCancelled:^
         {
             NSLog(@"User Cancelled Transaction");
             [HUD hide:YES];

/*** HERE FINISH MY CODE IF I'M JUST LOGGED IN GENERAL SETTING WITH MY APPLE ID ***/

         }];
    }

Upvotes: 2

Views: 1745

Answers (0)

Related Questions