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 SyncPurchases method overload that accepts a callback as parameter #493

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

MarkVillacampa
Copy link
Member

Historically, SyncPurchases didn't return a callback in Android (it did on iOS) so for hybrids we were forced to not accept a callback.

This is problematic because you can't know for sure when the SyncPurchases request finished, in order to for example call getCustomerInfo to get updated entitlements.

We recently updated PHC adding a version of the SyncPurchases method that accepts a callback, and this PR brings this improvement to Unity.

In order to keep backwards compatibility, and since C# accepts method overloads, we're simply adding a new SyncPurchases method that accepts a callback.

In the future we cal release a new minor that deprecates the old SyncPurchases method without callback.

@MarkVillacampa MarkVillacampa added the pr:feat A new feature label Aug 16, 2024
@MarkVillacampa MarkVillacampa merged commit 20e7685 into main Aug 16, 2024
7 checks passed
@MarkVillacampa MarkVillacampa deleted the sync-purchases-callback branch August 16, 2024 16:05
MarkVillacampa pushed a commit that referenced this pull request Aug 19, 2024
**This is an automatic release.**

### New Features
* Add SyncPurchases method overload that accepts a callback as parameter
(#493) via Mark Villacampa (@MarkVillacampa)
### Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.0.1 (#491) via
RevenueCat Git Bot (@RCGitBot)
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:feat A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants