-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support new native majors #485
Conversation
4175c3f
to
e2055e5
Compare
e2055e5
to
cbbcf59
Compare
072e1ae
to
87b3f8c
Compare
Want to test this better but this should be ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't see anything to call out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the note that I'm not at all familiar with Unity, all of the changes that you have here look good to me!
There is one function from iOS native 5.X that we should also bring in to be safe, recordPurchase. Let me know if you have any questions about the function and I'll be happy to help!
@@ -143,11 +134,11 @@ private void Configure(string newUserId) | |||
var dangerousSettings = new DangerousSettings(autoSyncPurchases); | |||
var builder = PurchasesConfiguration.Builder.Init(apiKey) | |||
.SetAppUserId(newUserId) | |||
.SetObserverMode(observerMode) | |||
.SetPurchasesAreCompletedBy(purchasesAreCompletedBy, storeKitVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩🤩
Ah yes thanks for the reminder! Will add that now |
The migration guide for Unity should be pretty similar to the react native one, just with Unity code samples instead of RN: https://github.com/RevenueCat/react-native-purchases/blob/main/migrations/v8-MIGRATION.md |
@@ -140,14 +131,20 @@ private void Configure(string newUserId) | |||
|| IsAndroidEmulator()) | |||
apiKey = useAmazon ? revenueCatAPIKeyAmazon : revenueCatAPIKeyGoogle; | |||
|
|||
if (purchasesAreCompletedBy == PurchasesAreCompletedBy.MyApp && storeKitVersion == StoreKitVersion.Default) | |||
{ | |||
Debug.Log("You must set a StoreKit version if you are setting PurchasesAreCompletedBy to MyApp. For Android, it doesn't matter which"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple things to note here, when configuring through the Editor:
- There is no breaking change even after removing the old observer mode. So if someone was setting observer mode in the editor before, there won't be any compilation issue when they migrate to the new version.
- There is also no compile-time check that makes it so you can't set "PurchasesAreCompletedBy.MyApp" without setting storeKitVersion as well.
For these 2 reasons, we're adding this runtime check which would make it so we don't configure the SDK in this situation and log this message.
With the BC7 update done in #485, we also had to update the Deferred mode underlying int value to match the new value expected by the billing client. This shouldn't have affected users since the previous change wasn't shipped yet
* commit '2ad738987fe4ff8fc27f05cef2bf15395cab67ce': Update VERSIONS.md Version bump for 7.1.0 Add SyncPurchases method overload that accepts a callback as parameter (RevenueCat#493) [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.0.1 (RevenueCat#491) Release/7.0.0 (RevenueCat#490) `Amazon`: Add getAmazonLWAConsentStatus method to support Quick Subscribe (RevenueCat#442) Update Deferred proration mode value to match BC7 (RevenueCat#489) Add support new native majors (RevenueCat#485) Bump rexml from 3.2.9 to 3.3.3 (RevenueCat#486) Bump danger from 9.4.3 to 9.5.0 (RevenueCat#487) Bump fastlane from 2.221.1 to 2.222.0 (RevenueCat#480) Fix `Gemfile.lock` with new fastlane plugin dependencies (RevenueCat#479) Update `VERSIONS.md` to include Billing client version and update fastlane plugin (RevenueCat#476) Update Unity IAP compatiiblity (RevenueCat#475) [AUTOMATIC] Release/6.10.0 (RevenueCat#474) Add support for `DEFERRED` upgrades and updates purchases-hybrid-common to 11.1.0 (RevenueCat#472) [AUTOMATIC BUMP] Updates purchases-hybrid-common to 11.0.0 (RevenueCat#470) Bump fastlane from 2.221.0 to 2.221.1 (RevenueCat#468) Bump fastlane from 2.220.0 to 2.221.0 (RevenueCat#466) [AUTOMATIC] Release/6.9.7 (RevenueCat#465) # Conflicts: # .version # CHANGELOG.latest.md # CHANGELOG.md # RevenueCat/Plugins/Android/PurchasesWrapper.java # RevenueCat/Plugins/iOS/PurchasesUnityHelper.m # RevenueCat/package.json # VERSIONS.md
This bumps PHC to 13.0.0 which includes breaking changes in the native SDKs: