Skip to content

Commit

Permalink
Merge commit '2ad738987fe4ff8fc27f05cef2bf15395cab67ce' into pba
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
kaushikpaperboat committed Aug 21, 2024
2 parents 8807161 + 2ad7389 commit 0d44cbe
Show file tree
Hide file tree
Showing 32 changed files with 849 additions and 353 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ jobs:
- run:
name: Install Pods
working_directory: IntegrationTests/buildiOS
command: pod install --verbose
command: pod install --repo-update --verbose

- save_cache:
key: 1-pods-{{ checksum "RevenueCat/Plugins/Editor/RevenueCatDependencies.xml" }}
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.9.7
7.1.0
4 changes: 2 additions & 2 deletions AMAZON-INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void OnInitialized(IStoreController controller, IExtensionProvider extens
if (product.hasReceipt) {
var amazonExtensions = storeExtensionProvider.GetExtension<IAmazonExtensions>();
var userId = amazonExtensions.amazonUserId;
purchases.SyncObserverModeAmazonPurchase(
purchases.SyncAmazonPurchase(
product.definition.id,
product.transactionID,
userId,
Expand All @@ -55,7 +55,7 @@ public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)

var amazonExtensions = storeExtensionProvider.GetExtension<IAmazonExtensions>();
var userId = amazonExtensions.amazonUserId;
purchases.SyncObserverModeAmazonPurchase(
purchases.SyncAmazonPurchase(
e.purchasedProduct.definition.id,
e.purchasedProduct.transactionID,
userId,
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.latest.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 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 10.9.0 (#464) via RevenueCat Git Bot (@RCGitBot)
* [Android 7.11.1](https://github.com/RevenueCat/purchases-android/releases/tag/7.11.1)
* [iOS 4.43.0](https://github.com/RevenueCat/purchases-ios/releases/tag/4.43.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 13.0.1 (#491) via RevenueCat Git Bot (@RCGitBot)
105 changes: 105 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,108 @@
## 7.1.0
### 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)

## 7.0.0
This latest release updates the Android SDK dependency from v7 to [v8](https://github.com/RevenueCat/purchases-android/releases/tag/6.0.0) to use BillingClient 7 and updates the iOS SDK dependency from v4 to v5 to use StoreKit 2 by default in the SDK.

### Migration Guides

- See [Android Native - V8 API Migration Guide](https://github.com/RevenueCat/purchases-android/blob/main/migrations/v8-MIGRATION.md) for a more thorough explanation of the Android changes.
- See [iOS Native - V5 Migration Guide](https://github.com/RevenueCat/purchases-ios/blob/main/Sources/DocCDocumentation/DocCDocumentation.docc/V5_API_Migration_guide.md) for a more thorough explanation of the iOS changes. Notably, this version uses StoreKit 2 to process purchases by default.

### New Minimum OS Versions

This release raises the minumum required OS versions to the following:

- iOS 13.0
- tvOS 13.0
- watchOS 6.2
- macOS 10.15
- Android: SDK 21 (Android 5.0)

### In-App Purchase Key Required for StoreKit 2

In order to use StoreKit 2, you must configure your In-App Purchase Key in the RevenueCat dashboard. You can find instructions describing how to do this [here](https://www.revenuecat.com/docs/in-app-purchase-key-configuration).

### `usesStoreKit2IfAvailable` is now `storeKitVersion`

When configuring the SDK, the `usesStoreKit2IfAvailable` parameter has been replaced by an optional `storeKitVersion` parameter. It defaults to letting the iOS SDK determine the most appropriate version of StoreKit at runtime. If you'd like to use a specific version of StoreKit, you may provide a value for `storeKitVersion` like so:

```
Purchases purchases = GetComponent<Purchases>();
Purchases.PurchasesConfiguration purchasesConfiguration =
Purchases.PurchasesConfiguration.Builder.Init("api_key")
.SetStoreKitVersion(Purchases.StoreKitVersion.StoreKit2)
.Build();
purchases.Configure(purchasesConfiguration);
```

### Observer Mode is now PurchasesAreCompletedBy

Version 7.0 of the SDK deprecates the term "Observer Mode" (and the APIs where this term was used), and replaces it with `PurchasesAreCompletedBy` (either RevenueCat or your app). When specifying that your app will complete purchases, you must provide the StoreKit version that your app is using to make purchases on iOS. If your app is only available on Android, you may provide any value since the native Android SDK ignores this value.

You can enable it when configuring the SDK:

```
Purchases purchases = GetComponent<Purchases>();
Purchases.PurchasesConfiguration purchasesConfiguration =
Purchases.PurchasesConfiguration.Builder.Init("api_key")
.SetPurchasesAreCompletedBy(Purchases.PurchasesAreCompletedBy.MyApp, Purchases.StoreKitVersion.StoreKit2)
.Build();
purchases.Configure(purchasesConfiguration);
```

#### ⚠️ Observing Purchases Completed by Your App on macOS

By default, when purchases are completed by your app using StoreKit 2 on macOS, the SDK does not detect a user's purchase until after the user foregrounds the app after the purchase has been made. If you'd like RevenueCat to immediately detect the user's purchase, call `Purchases.recordPurchase(productID)` for any new purchases, like so:

```
Purchases purchases = GetComponent<Purchases>();
purchases.recordPurchase(productID, (transaction, error) => { ... });
```

#### Observing Purchases Completed by Your App with StoreKit 1

If purchases are completed by your app using StoreKit 1, you will need to explicitly configure the SDK to use StoreKit 1:

```typescript
Purchases purchases = GetComponent<Purchases>();
Purchases.PurchasesConfiguration purchasesConfiguration =
Purchases.PurchasesConfiguration.Builder.Init("api_key")
.SetPurchasesAreCompletedBy(Purchases.PurchasesAreCompletedBy.MyApp, Purchases.StoreKitVersion.StoreKit1)
.Build();
purchases.Configure(purchasesConfiguration);
```

Full migration guide to V7: [Unity - V7 API Migration Guide](migrations/v7-MIGRATION.md)

### New Features
* `Amazon`: Add getAmazonLWAConsentStatus method to support Quick Subscribe (#442) via Mark Villacampa (@MarkVillacampa)
### Dependency Updates
* Bump rexml from 3.2.9 to 3.3.3 (#486) via dependabot[bot] (@dependabot[bot])
* Bump danger from 9.4.3 to 9.5.0 (#487) via dependabot[bot] (@dependabot[bot])
* Bump fastlane from 2.221.1 to 2.222.0 (#480) via dependabot[bot] (@dependabot[bot])
* Update `VERSIONS.md` to include Billing client version and update fastlane plugin (#476) via Toni Rico (@tonidero)
### Other Changes
* Fix `Gemfile.lock` with new fastlane plugin dependencies (#479) via Toni Rico (@tonidero)
* Update Unity IAP compatiiblity (#475) via Andy Boedo (@aboedo)

## 6.10.0
### New Features
* Add support for `DEFERRED` upgrades and updates purchases-hybrid-common to 11.1.0 (#472) via RevenueCat Git Bot (@RCGitBot)
* [Android 7.12.0](https://github.com/RevenueCat/purchases-android/releases/tag/7.12.0)
* [iOS 4.43.2](https://github.com/RevenueCat/purchases-ios/releases/tag/4.43.2)
* [iOS 4.43.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.43.1)
### Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 11.0.0 (#470) via RevenueCat Git Bot (@RCGitBot)
* [Android 7.12.0](https://github.com/RevenueCat/purchases-android/releases/tag/7.12.0)
* [iOS 4.43.2](https://github.com/RevenueCat/purchases-ios/releases/tag/4.43.2)
* [iOS 4.43.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.43.1)
* Bump fastlane from 2.221.0 to 2.221.1 (#468) via dependabot[bot] (@dependabot[bot])
* Bump fastlane from 2.220.0 to 2.221.0 (#466) via dependabot[bot] (@dependabot[bot])

## 6.9.7
### Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 10.9.0 (#464) via RevenueCat Git Bot (@RCGitBot)
Expand Down
69 changes: 38 additions & 31 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
GIT
remote: https://github.com/RevenueCat/fastlane-plugin-revenuecat_internal
revision: 9c82c7ab8dab77383245907fd6e5184a61398cae
revision: d5f07426f7779470e535aeba7a98a662842d8fa5
specs:
fastlane-plugin-revenuecat_internal (0.1.0)
rest-client

GEM
remote: https://rubygems.org/
Expand All @@ -11,25 +12,25 @@ GEM
base64
nkf
rexml
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.907.0)
aws-sdk-core (3.191.6)
aws-partitions (1.958.0)
aws-sdk-core (3.201.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.78.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.146.1)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (1.88.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.156.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.9.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand All @@ -44,7 +45,7 @@ GEM
highline (~> 2.0.0)
cork (0.3.0)
colored2 (~> 3.1)
danger (9.4.3)
danger (9.5.0)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
Expand All @@ -54,7 +55,6 @@ GEM
git (~> 1.13)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (>= 4.0)
terminal-table (>= 1, < 4)
declarative (0.0.20)
Expand All @@ -63,7 +63,7 @@ GEM
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.110.0)
excon (0.111.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand All @@ -87,15 +87,15 @@ GEM
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.220.0)
fastlane (2.222.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -177,44 +177,52 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
http-accept (1.7.0)
http-cookie (1.0.6)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.2)
jwt (2.8.1)
jwt (2.8.2)
base64
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
mini_magick (4.12.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0702)
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.0)
multipart-post (2.4.1)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.1)
netrc (0.11.0)
nkf (0.2.0)
no_proxy_fix (0.1.2)
octokit (8.1.0)
base64
octokit (9.1.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
optparse (0.4.0)
optparse (0.5.0)
os (1.1.4)
plist (3.7.1)
public_suffix (5.0.5)
rake (13.2.0)
public_suffix (6.0.1)
rake (13.2.1)
rchardet (1.8.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
retriable (3.1.2)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.3.3)
strscan
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand Down Expand Up @@ -242,13 +250,12 @@ GEM
uber (0.1.0)
unicode-display_width (2.5.0)
word_wrap (1.0.0)
xcodeproj (1.24.0)
xcodeproj (1.19.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand Down
1 change: 1 addition & 0 deletions IntegrationTests/Assets/APITests/ProrationModeAPITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ private void Start()
Purchases.ProrationMode prorationMode = Purchases.ProrationMode.ImmediateWithoutProration;
switch (prorationMode)
{
case Purchases.ProrationMode.Deferred:
case Purchases.ProrationMode.ImmediateWithoutProration:
case Purchases.ProrationMode.ImmediateWithTimeProration:
case Purchases.ProrationMode.ImmediateAndChargeProratedPrice:
Expand Down
20 changes: 15 additions & 5 deletions IntegrationTests/Assets/APITests/PurchasesAPITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ private void Start()
};

purchases.listener = new CustomListener();
purchases.observerMode = true;
purchases.userDefaultsSuiteName = "suitename";
purchases.proxyURL = "https://proxy-url.revenuecat.com";

Purchases.CustomerInfo receivedCustomerInfo;
Purchases.Error receivedError;
Purchases.StoreTransaction receivedTransaction;

Purchases.Package receivedPackage;
Purchases.Offerings receivedOfferings;
Expand Down Expand Up @@ -147,7 +147,6 @@ private void Start()
receivedError = error;
});

purchases.SetFinishTransactions(true);
#pragma warning disable CS0618 // Type or member is obsolete
purchases.SetAllowSharingStoreAccount(false);
#pragma warning restore CS0618 // Type or member is obsolete
Expand All @@ -170,7 +169,11 @@ private void Start()
});

purchases.SyncPurchases();
purchases.SetAutomaticAppleSearchAdsAttributionCollection(true);
purchases.SyncPurchases((customerInfo, error) =>
{
receivedCustomerInfo = customerInfo;
receivedError = error;
});
purchases.EnableAdServicesAttributionTokenCollection();
Dictionary<string, Purchases.IntroEligibility> receivedEligibilities;
purchases.CheckTrialOrIntroductoryPriceEligibility(new string[] { "a", "b" },
Expand Down Expand Up @@ -220,16 +223,23 @@ private void Start()
Purchases.PurchasesConfiguration purchasesConfiguration =
builder.SetUserDefaultsSuiteName("user_default")
.SetDangerousSettings(new Purchases.DangerousSettings(false))
.SetObserverMode(true)
.SetPurchasesAreCompletedBy(Purchases.PurchasesAreCompletedBy.MyApp, Purchases.StoreKitVersion.StoreKit2)
.SetUseAmazon(false)
.SetAppUserId(appUserId)
.SetUsesStoreKit2IfAvailable(false)
.SetStoreKitVersion(Purchases.StoreKitVersion.StoreKit2)
.SetShouldShowInAppMessagesAutomatically(false)
.SetEntitlementVerificationMode(Purchases.EntitlementVerificationMode.Informational)
.SetPendingTransactionsForPrepaidPlansEnabled(true)
.Build();
purchases.Configure(purchasesConfiguration);
purchases.RecordPurchase("product_id", (transaction, error) =>
{
receivedTransaction = transaction;
receivedError = error;
});

purchases.SyncObserverModeAmazonPurchase("product_id", "receipt_id", "amazon_user_id", "iso_currency_code", 1.99);
purchases.SyncAmazonPurchase("product_id", "receipt_id", "amazon_user_id", "iso_currency_code", 1.99);

purchases.ShowInAppMessages(new Purchases.InAppMessageType[] { Purchases.InAppMessageType.BillingIssue,
Purchases.InAppMessageType.PriceIncreaseConsent, Purchases.InAppMessageType.Generic });
Expand Down
Loading

0 comments on commit 0d44cbe

Please sign in to comment.