Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/watch os app #263

Merged
merged 4 commits into from
Jun 20, 2020
Merged

Feature/watch os app #263

merged 4 commits into from
Jun 20, 2020

Conversation

aboedo
Copy link
Member

@aboedo aboedo commented Jun 19, 2020

Review notes:

Most of the code here isn't particularly interesting. A lot of it is just boilerplate, including storyboards, and even the paywall is mostly ported over from the Swift example.

Interesting classes are:

RCReceiptFetcher, which has the workaround for apple watch
InterfaceController, which has the interface for the watch app.

@aboedo aboedo requested a review from vegaro June 19, 2020 00:16
@aboedo aboedo self-assigned this Jun 19, 2020
Comment on lines 16 to 27

#if TARGET_OS_WATCH
// as of watchOS 6.2.8, there's a bug where the receipt is stored in the sandbox receipt location,
// but the appStoreReceiptURL method returns the URL for the production receipt.
// This code replaces "sandbox" with "receipt" as the last component of the receiptURL so that we get the
// correct receipt.
// This has been filed as radar FB7699277. More info in https://github.com/RevenueCat/purchases-ios/issues/207.
NSString *receiptURLFolder = [[receiptURL absoluteString] stringByDeletingLastPathComponent];
NSURL *productionReceiptURL = [NSURL URLWithString:[receiptURLFolder stringByAppendingPathComponent:@"receipt"]];
receiptURL = productionReceiptURL;
#endif

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this workaround only works on Apple Watch and in Sandbox. I'm assuming that this would work correctly in production, since the whole problem is that the receipt gets stored in the production location anyway

@aboedo aboedo merged commit 9729494 into develop Jun 20, 2020
@aboedo aboedo deleted the feature/watch_os_app branch June 20, 2020 18:12
@aboedo aboedo mentioned this pull request Jul 9, 2020
@aboedo aboedo mentioned this pull request Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants