steprescott / SCPStoreKitManager

Block based store kit manager for In-App Purchase on iOS 7, 8 & 9 with receipt validation.
MIT License
68 stars 29 forks source link

Receipt validation: inconsistently looking at version number vs. build number? #15

Closed dmauer closed 9 years ago

dmauer commented 9 years ago

Unless I'm missing something, it looks to me that the method -(void)verifyReceiptAtPath:(NSString *)receiptPath success:(Success)successBlock failure:(Failure)failureBlock is always going to fail, because it first checks to confirm that the _bundleVersion is equal to the app's CFBundleShortVersionString (e.g. "3.1.4"), but then after it receives the receipt from Apple, it checks that same _bundleVersion against [receipt bundleVersion], which appears to instead contain the build number (e.g. "107"). At least, running my app in the sandbox, I get the build number in [receipt bundleVersion]. Am I doing something wrong, or is this a bug? Thanks.

steprescott commented 9 years ago

Will look into this. Thanks for reporting it.

rafaelmaroxa commented 9 years ago

Possible duplicate of #13, which was fixed by #14.

I suppose @dmauer is still having this issue because there was no release after #14 and the Podspec was not updated.

remiMargaria commented 9 years ago

I have the same problem, the issue is fixed but the Podspec is not updated, CFBundleShortVersionString should be replaced by CFBundleVersion in verifyReceiptAtPath.

steprescott commented 9 years ago

Thanks @rafaelmaroxa, I am currently focusing on my Masters so will update the pod spec when I can. Sorry for this.

dmauer commented 9 years ago

Yep, that was it -- podspec. Thanks.