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

Commit 161b955

Browse files
authored
Merge pull request #94 from superwall/develop
2.1.5
2 parents b8d55a9 + 5a26b56 commit 161b955

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22

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

5+
## 2.1.5
6+
7+
### Enhancements
8+
9+
- Exposes the `enableExperimentalDeviceVariables` `SuperwallOption`.
10+
511
## 2.1.4
612

7-
- Upgrades iOS SDK to 4.4.1 [View iOS SDK release notes](https://github.com/superwall/Superwall-iOS/releases/tag/4.4.1).
13+
### Enhancements
814

15+
- Upgrades iOS SDK to 4.4.1 [View iOS SDK release notes](https://github.com/superwall/Superwall-iOS/releases/tag/4.4.1).
916
- Upgrades Android SDK to 2.1.2 [View Android SDK release notes](https://github.com/superwall/Superwall-Android/releases/tag/2.1.2).
1017

11-
1218
## 2.1.3
1319

1420
### Fixes

ios/Json/SuperwallOptions+Json.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ extension SuperwallOptions {
1717
let localeIdentifier = dictionary["localeIdentifier"] as? String
1818
let isGameControllerEnabled = dictionary["isGameControllerEnabled"] as? Bool ?? false
1919
let storeKitVersion = dictionary["storeKitVersion"] as? String
20+
let enableExperimentalDeviceVariables =
21+
dictionary["enableExperimentalDeviceVariables"] as? String
2022

2123
let superwallOptions = SuperwallOptions()
2224
superwallOptions.paywalls = paywalls
@@ -28,6 +30,7 @@ extension SuperwallOptions {
2830
if let storeKitVersion = storeKitVersion {
2931
superwallOptions.storeKitVersion = storeKitVersion == "STOREKIT1" ? .storeKit1 : .storeKit2
3032
}
33+
superwallOptions.enableExperimentalDeviceVariables = enableExperimentalDeviceVariables
3134

3235
return superwallOptions
3336
}
@@ -36,14 +39,14 @@ extension SuperwallOptions {
3639
extension SuperwallOptions.NetworkEnvironment {
3740
static func fromJson(_ json: String) -> SuperwallOptions.NetworkEnvironment? {
3841
switch json {
39-
case "release":
40-
return .release
41-
case "releaseCandidate":
42-
return .releaseCandidate
43-
case "developer":
44-
return .developer
45-
default:
46-
return nil
42+
case "release":
43+
return .release
44+
case "releaseCandidate":
45+
return .releaseCandidate
46+
case "developer":
47+
return .developer
48+
default:
49+
return nil
4750
}
4851
}
4952
}

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.4",
3+
"version": "2.1.5",
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
@@ -30,6 +30,7 @@ export class SuperwallOptions {
3030
collectAdServicesAttribution: boolean = false;
3131
passIdentifiersToPlayStore: boolean = false;
3232
storeKitVersion?: "STOREKIT1" | "STOREKIT2";
33+
enableExperimentalDeviceVariables: boolean = false;
3334

3435
constructor(init?: Partial<SuperwallOptions>) {
3536
if (init) {
@@ -54,6 +55,7 @@ export class SuperwallOptions {
5455
collectAdServicesAttribution: this.collectAdServicesAttribution,
5556
passIdentifiersToPlayStore: this.passIdentifiersToPlayStore,
5657
storeKitVersion: this.storeKitVersion,
58+
enableExperimentalDeviceVariables: this.enableExperimentalDeviceVariables,
5759
};
5860
}
5961
}

0 commit comments

Comments
 (0)