react-native-nami-sdk 3.2.9 → 3.2.10-rc.1

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.
@@ -85,8 +85,8 @@ dependencies {
85
85
  implementation fileTree(dir: 'libs', include: ['*.jar'])
86
86
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
87
87
 
88
- playImplementation "com.namiml:sdk-android:3.2.9"
89
- amazonImplementation "com.namiml:sdk-amazon:3.2.9"
88
+ playImplementation "com.namiml:sdk-android:3.2.10-rc.01"
89
+ amazonImplementation "com.namiml:sdk-amazon:3.2.10-rc.01"
90
90
 
91
91
  implementation "com.facebook.react:react-native:+" // From node_modules
92
92
  coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
@@ -106,7 +106,7 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) :
106
106
  } else {
107
107
  Arguments.createArray()
108
108
  }
109
- val settingsList = mutableListOf("extendedClientInfo:react-native:3.2.9")
109
+ val settingsList = mutableListOf("extendedClientInfo:react-native:3.2.10")
110
110
  namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
111
111
  settingsList.addAll(commandsFromReact)
112
112
  }
@@ -230,6 +230,11 @@ class NamiPaywallManagerBridgeModule(reactContext: ReactApplicationContext) :
230
230
  NamiPaywallManager.setAppSuppliedVideoDetails(url = url, name = name)
231
231
  }
232
232
 
233
+ @ReactMethod
234
+ fun allowUserInteraction(allowed: Boolean) {
235
+ NamiPaywallManager.allowPaywallInteraction(allow = allowed)
236
+ }
237
+
233
238
  @ReactMethod
234
239
  fun addListener(eventName: String?) {
235
240
  }
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.2.9"]];
53
+ NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.2.10"]];
54
54
 
55
55
  // Add additional namiCommands app may have sent in.
56
56
  NSObject *appCommandStrings = configDict[@"namiCommands"];
@@ -43,6 +43,8 @@ RCT_EXTERN_METHOD(setProductDetails:(NSString *)productDetails allowOffers:(null
43
43
 
44
44
  RCT_EXTERN_METHOD(setAppSuppliedVideoDetails:(NSString *)url name:(nullable NSString *))
45
45
 
46
+ RCT_EXTERN_METHOD(allowUserInteraction:(BOOL *)allowed)
47
+
46
48
  + (BOOL)requiresMainQueueSetup {
47
49
  return YES;
48
50
  }
@@ -162,4 +162,11 @@ class RNNamiPaywallManager: RCTEventEmitter {
162
162
  func setAppSuppliedVideoDetails(url: String, name: String?) {
163
163
  NamiPaywallManager.setAppSuppliedVideoDetails(url: url, name: name)
164
164
  }
165
+
166
+ @objc(allowUserInteraction:)
167
+ func allowUserInteraction(allowed: Bool) {
168
+ DispatchQueue.main.async {
169
+ NamiPaywallManager.allowUserInteraction(allowed)
170
+ }
171
+ }
165
172
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nami-sdk",
3
- "version": "3.2.9",
3
+ "version": "3.2.10-rc.1",
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",
@@ -20,7 +20,7 @@ Pod::Spec.new do |s|
20
20
  s.source_files = "ios/**/*.{h,m,swift}"
21
21
  s.requires_arc = true
22
22
 
23
- s.dependency 'Nami', '3.2.9'
23
+ s.dependency 'Nami', '3.2.10-rc.01'
24
24
  s.dependency 'React'
25
25
 
26
26
  end
@@ -29,5 +29,6 @@ export interface INamiPaywallManager {
29
29
  isPaywallOpen: () => Promise<boolean>;
30
30
  setProductDetails: (productDetails: string, allowOffers: boolean) => void;
31
31
  setAppSuppliedVideoDetails: (url: string, name?: string) => void;
32
+ allowUserInteraction: (allowed: boolean) => void;
32
33
  }
33
34
  export declare const NamiPaywallManager: INamiPaywallManager;
@@ -51,6 +51,7 @@ export interface INamiPaywallManager {
51
51
  isPaywallOpen: () => Promise<boolean>;
52
52
  setProductDetails: (productDetails: string, allowOffers: boolean) => void;
53
53
  setAppSuppliedVideoDetails: (url: string, name?: string) => void;
54
+ allowUserInteraction: (allowed: boolean) => void;
54
55
  }
55
56
 
56
57
  const { NamiPaywallManagerBridge, RNNamiPaywallManager } = NativeModules;
@@ -168,4 +169,7 @@ export const NamiPaywallManager: INamiPaywallManager = {
168
169
  setAppSuppliedVideoDetails: (url: string, name?: string) => {
169
170
  RNNamiPaywallManager.setAppSuppliedVideoDetails(url, name);
170
171
  },
172
+ allowUserInteraction: (allowed: boolean) => {
173
+ RNNamiPaywallManager.allowUserInteraction(allowed);
174
+ },
171
175
  };