diff --git a/CHANGELOG.md b/CHANGELOG.md index fedbed1..cd0bf33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/react-native-superwall/releases) on GitHub. +## 2.1.0 (Beta 3) + +### Fixes + +- Adds support for `storeKitVersion` in `SuperwallOptions`. + ## 2.1.0 (Beta 2) ### Fixes diff --git a/ios/Json/SuperwallOptions+Json.swift b/ios/Json/SuperwallOptions+Json.swift index 787f03c..af98f92 100644 --- a/ios/Json/SuperwallOptions+Json.swift +++ b/ios/Json/SuperwallOptions+Json.swift @@ -16,6 +16,7 @@ extension SuperwallOptions { let localeIdentifier = dictionary["localeIdentifier"] as? String let isGameControllerEnabled = dictionary["isGameControllerEnabled"] as? Bool ?? false + let storeKitVersion = dictionary["storeKitVersion"] as? String let superwallOptions = SuperwallOptions() superwallOptions.paywalls = paywalls @@ -24,6 +25,9 @@ extension SuperwallOptions { superwallOptions.localeIdentifier = localeIdentifier superwallOptions.isGameControllerEnabled = isGameControllerEnabled superwallOptions.logging = logging + if let storeKitVersion = storeKitVersion { + superwallOptions.storeKitVersion = storeKitVersion == "STOREKIT1" ? .storeKit1 : .storeKit2 + } return superwallOptions } diff --git a/package.json b/package.json index 0223e95..dc50be0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@superwall/react-native-superwall", - "version": "2.1.0-beta.2", + "version": "2.1.0-beta.3", "description": "The React Native package for Superwall", "main": "lib/commonjs/index", "module": "lib/module/index", diff --git a/src/public/SuperwallOptions.ts b/src/public/SuperwallOptions.ts index 72ee4f9..0c2dccb 100644 --- a/src/public/SuperwallOptions.ts +++ b/src/public/SuperwallOptions.ts @@ -29,6 +29,7 @@ export class SuperwallOptions { logging: LoggingOptions = new LoggingOptions(); collectAdServicesAttribution: boolean = false; passIdentifiersToPlayStore: boolean = false; + storeKitVersion?: "STOREKIT1" | "STOREKIT2"; constructor(init?: Partial) { if (init) { @@ -52,6 +53,7 @@ export class SuperwallOptions { logging: this.logging.toJson(), collectAdServicesAttribution: this.collectAdServicesAttribution, passIdentifiersToPlayStore: this.passIdentifiersToPlayStore, + storeKitVersion: this.storeKitVersion, }; } }