Skip to content

Commit

Permalink
Release/7.0.0 (#490)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
tonidero authored Aug 7, 2024
1 parent 9952f9e commit 4b93a96
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.10.0
7.0.0
91 changes: 81 additions & 10 deletions CHANGELOG.latest.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,83 @@
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
* 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)
* `Amazon`: Add getAmazonLWAConsentStatus method to support Quick Subscribe (#442) via Mark Villacampa (@MarkVillacampa)
### 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])
* 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)
85 changes: 85 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,88 @@
## 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)
Expand Down
2 changes: 1 addition & 1 deletion RevenueCat/Plugins/Android/PurchasesWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class PurchasesWrapper {
private static final String HANDLE_LOG = "_handleLog";

private static final String PLATFORM_NAME = "unity";
private static final String PLUGIN_VERSION = "6.10.0";
private static final String PLUGIN_VERSION = "7.0.0";

private static String gameObject;

Expand Down
2 changes: 1 addition & 1 deletion RevenueCat/Plugins/iOS/PurchasesUnityHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ - (NSString *)platformFlavor {
}

- (NSString *)platformFlavorVersion {
return @"6.10.0";
return @"7.0.0";
}

@end
Expand Down
2 changes: 1 addition & 1 deletion RevenueCat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.revenuecat.purchases-unity",
"version": "6.10.0",
"version": "7.0.0",
"displayName": "RevenueCat SDK for Unity",
"description": "Unity in-app purchases and subscriptions made easy. Supports iOS and Android.",
"documentationUrl": "https://www.revenuecat.com/docs",
Expand Down
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
| Version | iOS version | Android version | Common version | Play Billing Library version | Unity IAP compatibility |
| ------------- | ----------- | --------------- | -------------- | ---------------------------- | ----------------------------- |
| 7.0.0 | [5.2.2](https://github.com/RevenueCat/purchases-ios/releases/tag/5.2.2) | [8.3.1](https://github.com/RevenueCat/purchases-android/releases/tag/8.3.1) | [13.0.0](https://github.com/RevenueCat/purchases-hybrid-common/releases/tag/13.0.0) | [7.0.0](https://developer.android.com/google/play/billing/release-notes) | Unity IAP 4.12.0+ (BC6) |
| 6.10.0 | 4.43.2 | 7.12.0 | 11.1.0 | 6.2.1 | Unity IAP 4.12.0+ (BC6) |
| 6.9.7 | 4.43.0 | 7.11.1 | 10.9.0 | 6.2.1 | Unity IAP 4.12.0+ (BC6) |
| 6.9.6 | 4.42.0 | 7.11.0 | 10.8.0 | 6.2.1 | Unity IAP 4.12.0+ (BC6) |
Expand Down

0 comments on commit 4b93a96

Please sign in to comment.