react-native-nami-sdk 3.3.0-beta.1 → 3.3.0-beta.3

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.
@@ -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.3.0-beta.01")
109
+ val settingsList = mutableListOf("extendedClientInfo:react-native:3.3.0-beta.3")
110
110
  namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
111
111
  settingsList.addAll(commandsFromReact)
112
112
  }
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.3.0-beta.1"]];
53
+ NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.3.0-beta.3"]];
54
54
 
55
55
  // Add additional namiCommands app may have sent in.
56
56
  NSObject *appCommandStrings = configDict[@"namiCommands"];
@@ -38,6 +38,8 @@ class RNNamiFlowManager: RCTEventEmitter {
38
38
  }
39
39
 
40
40
  @objc func resume() {
41
- NamiFlowManager.resume()
41
+ DispatchQueue.main.async {
42
+ NamiFlowManager.resume()
43
+ }
42
44
  }
43
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nami-sdk",
3
- "version": "3.3.0-beta.1",
3
+ "version": "3.3.0-beta.3",
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.3.0-beta.02'
23
+ s.dependency 'Nami', '3.3.0-beta.03'
24
24
  s.dependency 'React'
25
25
 
26
26
  end
@@ -1,30 +1,8 @@
1
- import { EmitterSubscription } from 'react-native';
2
-
3
- export interface INamiFlowManager {
4
- /**
5
- * Register a callback that will be invoked when a Nami Flow step is handed off to the app.
6
- * The callback receives the handoffTag (e.g., 'push', 'location') and optional handoffData.
7
- *
8
- * Returns a function to remove the listener.
9
- */
10
- registerStepHandoff: (
11
- callback: (handoffTag: string, handoffData?: string) => void
12
- ) => () => void;
13
-
14
- /**
15
- * Resume the Nami Flow after a handoff step is completed.
16
- */
17
- resume: () => void;
1
+ export declare enum NamiFlowManagerEvents {
2
+ RegisterStepHandoff = "RegisterStepHandoff"
18
3
  }
19
-
20
- /**
21
- * Event names emitted by the native NamiFlowManager module.
22
- */
23
- export enum NamiFlowManagerEvents {
24
- RegisterStepHandoff = 'RegisterStepHandoff',
4
+ export interface INamiFlowManager {
5
+ registerStepHandoff: (callback: (handoffTag: string, handoffData?: string) => void) => () => void;
6
+ resume: () => void;
25
7
  }
26
-
27
- /**
28
- * React Native bridge to the native Nami Flow Manager module.
29
- */
30
- export const NamiFlowManager: INamiFlowManager;
8
+ export declare const NamiFlowManager: INamiFlowManager;
@@ -33,7 +33,7 @@ export const NamiFlowManager: INamiFlowManager = {
33
33
  const subscription: EmitterSubscription = flowEmitter.addListener(
34
34
  NamiFlowManagerEvents.RegisterStepHandoff,
35
35
  (event: { handoffTag: string; handoffData?: string }) => {
36
- console.log('[NamiFlowManager] Received handoff event:', event);
36
+ console.warn('[NamiFlowManager] Received handoff event:', event);
37
37
  callback(event.handoffTag, event.handoffData);
38
38
  }
39
39
  );
@@ -56,4 +56,4 @@ export const NamiFlowManager: INamiFlowManager = {
56
56
  console.warn('[NamiFlowManager] Native method resume is not available.');
57
57
  }
58
58
  },
59
- };
59
+ };
package/src/types.d.ts CHANGED
@@ -56,17 +56,17 @@ export type NamiCampaign = {
56
56
  form_factors: NamiFormFactor[];
57
57
  external_segment: string | null;
58
58
  };
59
- type NamiFormFactor = {
60
- form_factor: string;
61
- supports_portrait?: boolean;
62
- supports_landscape?: boolean;
63
- }
64
59
  export declare enum NamiCampaignRuleType {
65
60
  DEFAULT = "default",
66
61
  LABEL = "label",
67
62
  UNKNOWN = "unknown",
68
63
  URL = "url"
69
64
  }
65
+ type NamiFormFactor = {
66
+ form_factor?: string;
67
+ supports_portrait?: boolean;
68
+ supports_landscape?: boolean;
69
+ };
70
70
  export declare enum LaunchCampaignError {
71
71
  DEFAULT_CAMPAIGN_NOT_FOUND = 0,
72
72
  LABELED_CAMPAIGN_NOT_FOUND = 1,
@@ -205,3 +205,4 @@ export type NamiPaywallEventVideoMetadata = {
205
205
  contentTimecode?: number;
206
206
  contentDuration?: number;
207
207
  };
208
+ export {};