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

Add support new native majors #485

Merged
merged 7 commits into from
Aug 5, 2024
Merged

Add support new native majors #485

merged 7 commits into from
Aug 5, 2024

Conversation

tonidero
Copy link
Contributor

@tonidero tonidero commented Aug 1, 2024

@tonidero tonidero added the pr:breaking Changes that are breaking label Aug 1, 2024
@tonidero tonidero force-pushed the update-latest-native-majors branch from 4175c3f to e2055e5 Compare August 1, 2024 12:38
@tonidero tonidero force-pushed the update-latest-native-majors branch from e2055e5 to cbbcf59 Compare August 1, 2024 13:16
@tonidero tonidero force-pushed the update-latest-native-majors branch from 072e1ae to 87b3f8c Compare August 1, 2024 14:38
@tonidero tonidero marked this pull request as ready for review August 1, 2024 14:53
@tonidero tonidero requested a review from a team August 1, 2024 14:53
@tonidero
Copy link
Contributor Author

tonidero commented Aug 1, 2024

Want to test this better but this should be ready for review

Copy link
Contributor

@vegaro vegaro left a 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

Copy link
Contributor

@fire-at-will fire-at-will left a 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)
Copy link
Contributor

Choose a reason for hiding this comment

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

🤩🤩

@tonidero
Copy link
Contributor Author

tonidero commented Aug 1, 2024

Ah yes thanks for the reminder! Will add that now

@tonidero tonidero requested a review from fire-at-will August 2, 2024 07:14
@fire-at-will
Copy link
Contributor

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");
Copy link
Contributor Author

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.

@tonidero tonidero merged commit 07f6f25 into main Aug 5, 2024
7 checks passed
@tonidero tonidero deleted the update-latest-native-majors branch August 5, 2024 11:09
tonidero added a commit that referenced this pull request Aug 6, 2024
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
kaushikpaperboat added a commit to Kiddopia/purchases-unity that referenced this pull request Aug 23, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:breaking Changes that are breaking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants