react-native-nami-sdk 3.0.31 → 3.0.32
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
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.8"
|
|
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.32")
|
|
119
119
|
namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
|
|
120
120
|
settingsList.addAll(commandsFromReact)
|
|
121
121
|
}
|
|
@@ -25,7 +25,7 @@ class NamiPaywallManagerBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
25
25
|
fun buySkuComplete(dict: ReadableMap, storeType: String) {
|
|
26
26
|
var product: ReadableMap? = null
|
|
27
27
|
var productId: String? = null
|
|
28
|
-
var
|
|
28
|
+
var skuRefId: String? = null
|
|
29
29
|
var typeString: String? = null
|
|
30
30
|
var purchaseSourceString: String? = null
|
|
31
31
|
var expiresDateInt: Int? = null
|
|
@@ -54,7 +54,7 @@ class NamiPaywallManagerBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
if (product.hasKey("skuId")) {
|
|
57
|
-
|
|
57
|
+
skuRefId = product.getString("skuId")
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
if (product.hasKey("type")) {
|
|
@@ -75,21 +75,6 @@ class NamiPaywallManagerBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
75
75
|
purchaseDate = Date(purchaseDateInt * 1000L)
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
skuType = when (typeString) {
|
|
79
|
-
"UNKNOWN" -> {
|
|
80
|
-
NamiSKUType.UNKNOWN
|
|
81
|
-
}
|
|
82
|
-
"SUBSCRIPTION" -> {
|
|
83
|
-
NamiSKUType.SUBSCRIPTION
|
|
84
|
-
}
|
|
85
|
-
"ONE_TIME_PURCHASE" -> {
|
|
86
|
-
NamiSKUType.ONE_TIME_PURCHASE
|
|
87
|
-
}
|
|
88
|
-
else -> {
|
|
89
|
-
NamiSKUType.UNKNOWN
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
78
|
val purchaseSource = when (purchaseSourceString) {
|
|
94
79
|
"CAMPAIGN" -> {
|
|
95
80
|
NamiPurchaseSource.CAMPAIGN
|
|
@@ -105,19 +90,10 @@ class NamiPaywallManagerBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
105
90
|
}
|
|
106
91
|
}
|
|
107
92
|
|
|
108
|
-
if (productId != null &&
|
|
109
|
-
val namiSku = NamiSKU(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
amazonProduct = null,
|
|
113
|
-
id = productId,
|
|
114
|
-
type = skuType,
|
|
115
|
-
name = "",
|
|
116
|
-
featured = false,
|
|
117
|
-
rawDisplayText = null,
|
|
118
|
-
rawSubDisplayText = null,
|
|
119
|
-
entitlements = emptyList(),
|
|
120
|
-
variables = null,
|
|
93
|
+
if (productId != null && skuRefId != null) {
|
|
94
|
+
val namiSku = NamiSKU.create(
|
|
95
|
+
skuRefId = skuRefId,
|
|
96
|
+
skuId = productId,
|
|
121
97
|
)
|
|
122
98
|
var purchaseSuccess: NamiPurchaseSuccess? = null
|
|
123
99
|
|
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.32"]];
|
|
56
56
|
|
|
57
57
|
// Add additional namiCommands app may have sent in.
|
|
58
58
|
NSObject *appCommandStrings = configDict[@"namiCommands"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nami-sdk",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.32",
|
|
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",
|
|
@@ -30,6 +30,7 @@ export interface INamiPaywallManager {
|
|
|
30
30
|
buySkuCompleteGooglePlay: (
|
|
31
31
|
purchaseSuccess: NamiPurchaseSuccessGooglePlay,
|
|
32
32
|
) => void;
|
|
33
|
+
buySkuCancel: () => void;
|
|
33
34
|
registerBuySkuHandler: (
|
|
34
35
|
callback: (sku: NamiSKU) => void,
|
|
35
36
|
) => EmitterSubscription['remove'];
|