Skip to content

Commit

Permalink
Fix bug caused by bug fix that worked around sandbox receipts being s…
Browse files Browse the repository at this point in the history
…tored in wrong path (#330)
  • Loading branch information
dylanmaryk authored Sep 4, 2020
1 parent 5eb37fd commit 7a7c6ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Purchases/Purchasing/RCReceiptFetcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ - (NSData *)receiptData {
// correct receipt.
// This has been filed as radar FB7699277. More info in https://github.com/RevenueCat/purchases-ios/issues/207.

if (RCSystemInfo.isSandbox) {
NSOperatingSystemVersion minimumOSVersionWithoutBug = { .majorVersion = 7, .minorVersion = 0, .patchVersion = 0 };
BOOL isBelowMinimumOSVersionWithoutBug = ![NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:minimumOSVersionWithoutBug];
if (isBelowMinimumOSVersionWithoutBug && RCSystemInfo.isSandbox) {
NSString *receiptURLFolder = [[receiptURL absoluteString] stringByDeletingLastPathComponent];
NSURL *productionReceiptURL = [NSURL URLWithString:[receiptURLFolder stringByAppendingPathComponent:@"receipt"]];
receiptURL = productionReceiptURL;
Expand Down

0 comments on commit 7a7c6ad

Please sign in to comment.