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

Release/3.14.1 #1264

Merged
merged 5 commits into from Feb 8, 2022
Merged

Release/3.14.1 #1264

merged 5 commits into from Feb 8, 2022

Conversation

aboedo
Copy link
Member

@aboedo aboedo commented Feb 7, 2022

  • Fixed an issue where checkTrialOrIntroductoryPriceEligibility might refresh the receipt if it's not present on device, causing a log in prompt for App Store credentials.
    Release/3.14.1 #1264

@aboedo aboedo self-assigned this Feb 7, 2022
@@ -382,7 +382,7 @@ NS_SWIFT_NAME(syncPurchases(_:));
/**
Computes whether or not a user is eligible for the introductory pricing period of a given product. You should use this method to determine whether or not you show the user the normal product price or the introductory price. This also applies to trials (trials are considered a type of introductory pricing).

@note Subscription groups are automatically collected for determining eligibility. If RevenueCat can't definitively compute the eligibilty, most likely because of missing group information, it will return `RCIntroEligibilityStatusUnknown`. The best course of action on unknown status is to display the non-intro pricing, to not create a misleading situation. To avoid this, make sure you are testing with the latest version of iOS so that the subscription group can be collected by the SDK.
@note Subscription groups are automatically collected for determining eligibility. If RevenueCat can't definitively compute the eligiibilty, most likely because of missing group information, it will return `RCIntroEligibilityStatusUnknown`. The best course of action on unknown status is to display the non-intro pricing, to not create a misleading situation. To avoid this, make sure you are testing with the latest version of iOS so that the subscription group can be collected by the SDK.
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops?

Copy link
Member Author

Choose a reason for hiding this comment

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

LOL I went to fix it and I made it worse

expect(self.requestFetcher.refreshReceiptCalled) == false
expect(self.receiptFetcher.receiptDataCalled) == false

purchases!.checkTrialOrIntroductoryPriceEligibility([]) { (eligibilities) in
Copy link
Contributor

Choose a reason for hiding this comment

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

The ! isn't required right? It's already an implicitly unwrapped optional.

Copy link
Member Author

Choose a reason for hiding this comment

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

great catch!! I was mislead because we're actually treating purchases as a regular optional everywhere in this file. I updated all references, since that's not necessary

@aboedo aboedo marked this pull request as ready for review February 7, 2022 17:38
@aboedo
Copy link
Member Author

aboedo commented Feb 7, 2022

This is the first step toward fixing RevenueCat/react-native-purchases#328.
Once this is merged, we need to propagate the fix to hybrid common and then react-native-purchases

@@ -382,7 +382,7 @@ NS_SWIFT_NAME(syncPurchases(_:));
/**
Computes whether or not a user is eligible for the introductory pricing period of a given product. You should use this method to determine whether or not you show the user the normal product price or the introductory price. This also applies to trials (trials are considered a type of introductory pricing).

@note Subscription groups are automatically collected for determining eligibility. If RevenueCat can't definitively compute the eligibilty, most likely because of missing group information, it will return `RCIntroEligibilityStatusUnknown`. The best course of action on unknown status is to display the non-intro pricing, to not create a misleading situation. To avoid this, make sure you are testing with the latest version of iOS so that the subscription group can be collected by the SDK.
@note Subscription groups are automatically collected for determining eligibility. If RevenueCat can't definitively compute the eligibility, most likely because of missing group information, it will return `RCIntroEligibilityStatusUnknown`. The best course of action on unknown status is to display the non-intro pricing, to not create a misleading situation. To avoid this, make sure you are testing with the latest version of iOS so that the subscription group can be collected by the SDK.
Copy link
Contributor

Choose a reason for hiding this comment

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

nodding.gif

Copy link
Contributor

@taquitos taquitos left a comment

Choose a reason for hiding this comment

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

🙌 🐐 🎈

@aboedo aboedo merged commit 3f72670 into release/3.x.x Feb 8, 2022
@aboedo aboedo deleted the release/3.14.1 branch February 8, 2022 13:49
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.

None yet

3 participants