MugunthKumar / MKStoreKit

The "Goto" In App Purchases Framework for iOS 8+
2.09k stars 430 forks source link

Receipt validation failed with error: The reciept does not exist #236

Closed ckbhodge closed 9 years ago

ckbhodge commented 9 years ago

I'm getting this error right after calling

[[MKStoreKit sharedKit] startProductRequest]; 

in the AppDelegate's didFinishLaunchingWithOptions method:

Receipt validation failed with error: Error Domain=com.mugunthkumar.mkstorekit Code=21009 "The reciept does not exist." UserInfo=0x7ff72942d910 {NSLocalizedDescription=The reciept does not exist.}

Stepping through the debugger, it happens right after this call in MKStoreKit.m:

dispatch_once(&oncePredicate, ^{
      _sharedKit = [[super allocWithZone:nil] init];
      [[SKPaymentQueue defaultQueue] addTransactionObserver:_sharedKit];

I checked and I do not have an IF ELSE for debug mode vs. production around the call.

ckbhodge commented 9 years ago

Simple fix: IAPs do not work from the simulator. You must run it from a real device. Remember to uninstall the app and clear cache before deploying from xCode to the device.