react-native-nami-sdk 3.1.12 → 3.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/CI.yaml +2 -2
- package/.github/workflows/app_stg.yaml +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/nami/reactlibrary/NamiBridgeModule.kt +1 -1
- package/android/src/main/java/com/nami/reactlibrary/NamiUtil.kt +4 -1
- package/ios/Nami.m +1 -1
- package/ios/NamiPurchaseManagerBridge.swift +5 -3
- package/package.json +1 -1
- package/react-native-nami-sdk.podspec +1 -1
- package/src/types.ts +7 -2
|
@@ -97,7 +97,7 @@ jobs:
|
|
|
97
97
|
working-directory: source/examples/Basic
|
|
98
98
|
|
|
99
99
|
- name: Install iOS pods
|
|
100
|
-
run: pod install
|
|
100
|
+
run: RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
|
|
101
101
|
working-directory: source/examples/Basic/ios
|
|
102
102
|
|
|
103
103
|
- name: Rebuild cache detox
|
|
@@ -134,7 +134,7 @@ jobs:
|
|
|
134
134
|
name: detox-artifacts
|
|
135
135
|
path: artifacts
|
|
136
136
|
e2e-android:
|
|
137
|
-
runs-on: macos-
|
|
137
|
+
runs-on: macos-12
|
|
138
138
|
env:
|
|
139
139
|
DETOX_CONFIGURATION: android.emu.release
|
|
140
140
|
|
|
@@ -310,7 +310,7 @@ jobs:
|
|
|
310
310
|
- name: Update App Platform ID
|
|
311
311
|
working-directory: source/examples/TestNamiTV/config/
|
|
312
312
|
run: |
|
|
313
|
-
sed -i '' -e "s/
|
|
313
|
+
sed -i '' -e "s/APPLE_STAGE_APP_PLATFORM_ID/$TESTNAMITV_APPLE_STG_APP_PLATFORM_ID/" index.ts
|
|
314
314
|
env:
|
|
315
315
|
TESTNAMITV_APPLE_STG_APP_PLATFORM_ID: '${{ secrets.APPLE_STG_APP_PLATFORM_ID }}'
|
|
316
316
|
|
package/android/build.gradle
CHANGED
|
@@ -84,7 +84,7 @@ dependencies {
|
|
|
84
84
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
85
85
|
|
|
86
86
|
implementation 'com.github.jeziellago:compose-markdown:0.3.0'
|
|
87
|
-
compileOnly "com.namiml:sdk-amazon:3.1.
|
|
87
|
+
compileOnly "com.namiml:sdk-amazon:3.1.16"
|
|
88
88
|
|
|
89
89
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
90
90
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
|
|
@@ -108,7 +108,7 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
108
108
|
} else {
|
|
109
109
|
Arguments.createArray()
|
|
110
110
|
}
|
|
111
|
-
val settingsList = mutableListOf("extendedClientInfo:react-native:3.1.
|
|
111
|
+
val settingsList = mutableListOf("extendedClientInfo:react-native:3.1.14")
|
|
112
112
|
namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
|
|
113
113
|
settingsList.addAll(commandsFromReact)
|
|
114
114
|
}
|
|
@@ -79,7 +79,10 @@ fun NamiSKU.toSkuDict(): WritableMap {
|
|
|
79
79
|
productDict.putString("skuId", this.skuId)
|
|
80
80
|
productDict.putString("id", this.id)
|
|
81
81
|
productDict.putString("type", this.type.toString())
|
|
82
|
-
|
|
82
|
+
|
|
83
|
+
if (this.promoId != null) {
|
|
84
|
+
productDict.putString("promoId", this.promoId)
|
|
85
|
+
}
|
|
83
86
|
|
|
84
87
|
return productDict
|
|
85
88
|
}
|
package/ios/Nami.m
CHANGED
|
@@ -50,7 +50,7 @@ RCT_EXPORT_METHOD(configure: (NSDictionary *)configDict completion: (RCTResponse
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Start commands with header iformation for Nami to let them know this is a React client.
|
|
53
|
-
NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.1.
|
|
53
|
+
NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.1.14"]];
|
|
54
54
|
|
|
55
55
|
// Add additional namiCommands app may have sent in.
|
|
56
56
|
NSObject *appCommandStrings = configDict[@"namiCommands"];
|
|
@@ -53,15 +53,17 @@ class RNNamiPurchaseManager: RCTEventEmitter {
|
|
|
53
53
|
typeString = "unknown"
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
var skuDict: [String: Any?] = [
|
|
57
57
|
"id": sku.id,
|
|
58
58
|
"skuId": sku.skuId,
|
|
59
59
|
"type": typeString,
|
|
60
60
|
"appleProduct": productDict,
|
|
61
|
-
"promoId": sku.promoId,
|
|
62
|
-
"promoToken": "",
|
|
63
61
|
]
|
|
64
62
|
|
|
63
|
+
if let promoId = sku.promoId {
|
|
64
|
+
skuDict["promoId"] = sku.promoId
|
|
65
|
+
}
|
|
66
|
+
|
|
65
67
|
return NSDictionary(dictionary: skuDict.compactMapValues { $0 })
|
|
66
68
|
}
|
|
67
69
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nami-sdk",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.14",
|
|
4
4
|
"description": "React Native Module for Nami - Easy subscriptions & in-app purchases, with powerful built-in paywalls and A/B testing.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"types": "index.d.ts",
|
package/src/types.ts
CHANGED
|
@@ -112,8 +112,8 @@ export type NamiSKU = {
|
|
|
112
112
|
googleProduct?: GoogleProduct;
|
|
113
113
|
amazonProduct?: AmazonProduct;
|
|
114
114
|
type: NamiSKUType;
|
|
115
|
-
promoId?: string;
|
|
116
|
-
promoToken?: string;
|
|
115
|
+
promoId?: string | null;
|
|
116
|
+
promoToken?: string | null;
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
export enum NamiPurchaseState {
|
|
@@ -275,6 +275,11 @@ export enum NamiPaywallAction {
|
|
|
275
275
|
PURCHASE_PENDING = 'PURCHASE_PENDING',
|
|
276
276
|
PURCHASE_UNKNOWN = 'PURCHASE_UNKNOWN',
|
|
277
277
|
PURCHASE_DEFERRED = 'PURCHASE_DEFERRED',
|
|
278
|
+
DEEPLINK = 'DEEPLINK',
|
|
279
|
+
TOGGLE_CHANGE = 'TOGGLE_CHANGE',
|
|
280
|
+
PAGE_CHANGE = 'PAGE_CHANGE',
|
|
281
|
+
SLIDE_CHANGE = 'SLIDE_CHANGE',
|
|
282
|
+
UNKNOWN = 'UNKNOWN',
|
|
278
283
|
}
|
|
279
284
|
|
|
280
285
|
// NamiPurchaseManager
|