diff --git a/CHANGELOG.md b/CHANGELOG.md index 3396cee..e7f2140 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,19 @@ The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/react-native-superwall/releases) on GitHub. +## 2.1.5 + +### Enhancements + +- Exposes the `enableExperimentalDeviceVariables` `SuperwallOption`. + ## 2.1.4 -- Upgrades iOS SDK to 4.4.1 [View iOS SDK release notes](https://github.com/superwall/Superwall-iOS/releases/tag/4.4.1). +### Enhancements +- Upgrades iOS SDK to 4.4.1 [View iOS SDK release notes](https://github.com/superwall/Superwall-iOS/releases/tag/4.4.1). - Upgrades Android SDK to 2.1.2 [View Android SDK release notes](https://github.com/superwall/Superwall-Android/releases/tag/2.1.2). - ## 2.1.3 ### Fixes diff --git a/ios/Json/SuperwallOptions+Json.swift b/ios/Json/SuperwallOptions+Json.swift index af98f92..d16b3fd 100644 --- a/ios/Json/SuperwallOptions+Json.swift +++ b/ios/Json/SuperwallOptions+Json.swift @@ -17,6 +17,8 @@ extension SuperwallOptions { let localeIdentifier = dictionary["localeIdentifier"] as? String let isGameControllerEnabled = dictionary["isGameControllerEnabled"] as? Bool ?? false let storeKitVersion = dictionary["storeKitVersion"] as? String + let enableExperimentalDeviceVariables = + dictionary["enableExperimentalDeviceVariables"] as? String let superwallOptions = SuperwallOptions() superwallOptions.paywalls = paywalls @@ -28,6 +30,7 @@ extension SuperwallOptions { if let storeKitVersion = storeKitVersion { superwallOptions.storeKitVersion = storeKitVersion == "STOREKIT1" ? .storeKit1 : .storeKit2 } + superwallOptions.enableExperimentalDeviceVariables = enableExperimentalDeviceVariables return superwallOptions } @@ -36,14 +39,14 @@ extension SuperwallOptions { extension SuperwallOptions.NetworkEnvironment { static func fromJson(_ json: String) -> SuperwallOptions.NetworkEnvironment? { switch json { - case "release": - return .release - case "releaseCandidate": - return .releaseCandidate - case "developer": - return .developer - default: - return nil + case "release": + return .release + case "releaseCandidate": + return .releaseCandidate + case "developer": + return .developer + default: + return nil } } } diff --git a/package.json b/package.json index a22c7da..9435f7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@superwall/react-native-superwall", - "version": "2.1.4", + "version": "2.1.5", "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 0c2dccb..d5b697a 100644 --- a/src/public/SuperwallOptions.ts +++ b/src/public/SuperwallOptions.ts @@ -30,6 +30,7 @@ export class SuperwallOptions { collectAdServicesAttribution: boolean = false; passIdentifiersToPlayStore: boolean = false; storeKitVersion?: "STOREKIT1" | "STOREKIT2"; + enableExperimentalDeviceVariables: boolean = false; constructor(init?: Partial) { if (init) { @@ -54,6 +55,7 @@ export class SuperwallOptions { collectAdServicesAttribution: this.collectAdServicesAttribution, passIdentifiersToPlayStore: this.passIdentifiersToPlayStore, storeKitVersion: this.storeKitVersion, + enableExperimentalDeviceVariables: this.enableExperimentalDeviceVariables, }; } }