Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit fb3a4d4

Browse files
authored
Merge pull request #84 from superwall/feat/add-storekit-option
2.1.0-beta.3
2 parents 8879e1c + 91a0315 commit fb3a4d4

4 files changed

Lines changed: 13 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/react-native-superwall/releases) on GitHub.
44

5+
## 2.1.0 (Beta 3)
6+
7+
### Fixes
8+
9+
- Adds support for `storeKitVersion` in `SuperwallOptions`.
10+
511
## 2.1.0 (Beta 2)
612

713
### Fixes

ios/Json/SuperwallOptions+Json.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ extension SuperwallOptions {
1616

1717
let localeIdentifier = dictionary["localeIdentifier"] as? String
1818
let isGameControllerEnabled = dictionary["isGameControllerEnabled"] as? Bool ?? false
19+
let storeKitVersion = dictionary["storeKitVersion"] as? String
1920

2021
let superwallOptions = SuperwallOptions()
2122
superwallOptions.paywalls = paywalls
@@ -24,6 +25,9 @@ extension SuperwallOptions {
2425
superwallOptions.localeIdentifier = localeIdentifier
2526
superwallOptions.isGameControllerEnabled = isGameControllerEnabled
2627
superwallOptions.logging = logging
28+
if let storeKitVersion = storeKitVersion {
29+
superwallOptions.storeKitVersion = storeKitVersion == "STOREKIT1" ? .storeKit1 : .storeKit2
30+
}
2731

2832
return superwallOptions
2933
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@superwall/react-native-superwall",
3-
"version": "2.1.0-beta.2",
3+
"version": "2.1.0-beta.3",
44
"description": "The React Native package for Superwall",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

src/public/SuperwallOptions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export class SuperwallOptions {
2929
logging: LoggingOptions = new LoggingOptions();
3030
collectAdServicesAttribution: boolean = false;
3131
passIdentifiersToPlayStore: boolean = false;
32+
storeKitVersion?: "STOREKIT1" | "STOREKIT2";
3233

3334
constructor(init?: Partial<SuperwallOptions>) {
3435
if (init) {
@@ -52,6 +53,7 @@ export class SuperwallOptions {
5253
logging: this.logging.toJson(),
5354
collectAdServicesAttribution: this.collectAdServicesAttribution,
5455
passIdentifiersToPlayStore: this.passIdentifiersToPlayStore,
56+
storeKitVersion: this.storeKitVersion,
5557
};
5658
}
5759
}

0 commit comments

Comments
 (0)