react-native-nami-sdk 3.0.21 → 3.0.22
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/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/NamiCampaignManagerBridge.kt +6 -3
- package/ios/Nami.m +1 -1
- package/ios/NamiPaywallManagerBridge.swift +5 -3
- package/package.json +1 -1
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
|
-
implementation "com.namiml:sdk-android:3.0.
|
|
87
|
+
implementation "com.namiml:sdk-android:3.0.24"
|
|
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"
|
|
@@ -115,7 +115,7 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
115
115
|
} else {
|
|
116
116
|
Arguments.createArray()
|
|
117
117
|
}
|
|
118
|
-
val settingsList = mutableListOf("extendedClientInfo:react-native:3.0.
|
|
118
|
+
val settingsList = mutableListOf("extendedClientInfo:react-native:3.0.22")
|
|
119
119
|
namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
|
|
120
120
|
settingsList.addAll(commandsFromReact)
|
|
121
121
|
}
|
|
@@ -57,7 +57,6 @@ class NamiCampaignManagerBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
57
57
|
|
|
58
58
|
var paywallLaunchContext: PaywallLaunchContext? = null
|
|
59
59
|
if (context != null) {
|
|
60
|
-
|
|
61
60
|
val productGroups: MutableList<String> = mutableListOf()
|
|
62
61
|
val customAttributes: MutableMap<String, String> = mutableMapOf()
|
|
63
62
|
|
|
@@ -69,7 +68,6 @@ class NamiCampaignManagerBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
69
68
|
if (groupString != null) {
|
|
70
69
|
productGroups.add(groupString)
|
|
71
70
|
}
|
|
72
|
-
|
|
73
71
|
}
|
|
74
72
|
}
|
|
75
73
|
Log.d(LOG_TAG, "productGroups $productGroups")
|
|
@@ -87,7 +85,12 @@ class NamiCampaignManagerBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
if (context.hasKey("productGroups")) {
|
|
89
|
+
paywallLaunchContext = PaywallLaunchContext(productGroups.toList(), customAttributes)
|
|
90
|
+
} else {
|
|
91
|
+
paywallLaunchContext = PaywallLaunchContext(null, customAttributes)
|
|
92
|
+
}
|
|
93
|
+
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
if (theActivity != null) {
|
package/ios/Nami.m
CHANGED
|
@@ -52,7 +52,7 @@ RCT_EXPORT_METHOD(configure: (NSDictionary *)configDict completion: (RCTResponse
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// Start commands with header iformation for Nami to let them know this is a React client.
|
|
55
|
-
NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.0.
|
|
55
|
+
NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.0.22"]];
|
|
56
56
|
|
|
57
57
|
// Add additional namiCommands app may have sent in.
|
|
58
58
|
NSObject *appCommandStrings = configDict[@"namiCommands"];
|
|
@@ -124,7 +124,9 @@ class RNNamiPaywallManager: RCTEventEmitter {
|
|
|
124
124
|
|
|
125
125
|
@objc(isHidden:rejecter:)
|
|
126
126
|
func isHidden(resolve: @escaping RCTPromiseResolveBlock, reject _: @escaping RCTPromiseRejectBlock) {
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
DispatchQueue.main.async {
|
|
128
|
+
let isHidden = NamiPaywallManager.isHidden()
|
|
129
|
+
resolve(isHidden)
|
|
130
|
+
}
|
|
129
131
|
}
|
|
130
|
-
}
|
|
132
|
+
}
|
package/package.json
CHANGED