From cd6fa255abb267575ac0acecde19d2c4d784edad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20To=CC=88r?= <3296904+yusuftor@users.noreply.github.com> Date: Fri, 13 Jun 2025 14:56:01 +0200 Subject: [PATCH 1/3] Exposes enableExperimentalDeviceVariables --- CHANGELOG.md | 5 ++++- ios/Json/SuperwallOptions+Json.swift | 19 +++++++++++-------- src/public/SuperwallOptions.ts | 2 ++ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3396cee..5c92097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,13 @@ The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/react-native-superwall/releases) on GitHub. +## 2.1.5 + +- 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). - - Upgrades Android SDK to 2.1.2 [View Android SDK release notes](https://github.com/superwall/Superwall-Android/releases/tag/2.1.2). 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/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, }; } } From 44eb479467928a5a9b79751c7fc8e80db9a27319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20To=CC=88r?= <3296904+yusuftor@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:01:05 +0200 Subject: [PATCH 2/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From 5a26b56cd26b41cebbebb139556be5d9cce8f13e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20To=CC=88r?= <3296904+yusuftor@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:01:34 +0200 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c92097..e7f2140 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,17 @@ The changelog for `Superwall`. Also see the [releases](https://github.com/superw ## 2.1.5 +### Enhancements + - Exposes the `enableExperimentalDeviceVariables` `SuperwallOption`. ## 2.1.4 +### 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