react-native-nami-sdk 3.3.2 → 3.3.3-2
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 +2 -2
- package/android/src/main/AndroidManifest.xml +14 -1
- package/android/src/main/java/com/namiml/reactnative/NamiBridgePackage.java +15 -0
- package/android/src/main/java/com/namiml/reactnative/NamiFlowManagerBridge.kt +22 -17
- package/android/src/main/java/com/namiml/reactnative/NamiOverlayControlBridge.kt +171 -0
- package/android/src/main/java/com/namiml/reactnative/ReactOverlayActivity.kt +29 -0
- package/android/src/main/res/values/styles.xml +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/specs/NativeNamiFlowManager.d.ts +1 -0
- package/dist/specs/NativeNamiOverlayControl.d.ts +9 -0
- package/dist/src/NamiOverlayControl.d.ts +9 -0
- package/dist/src/NamiOverlayHost.d.ts +1 -0
- package/dist/src/overlay.d.ts +4 -0
- package/dist/src/registerOverlay.d.ts +1 -0
- package/dist/src/version.d.ts +1 -1
- package/index.ts +1 -0
- package/ios/Nami.swift +21 -8
- package/ios/NamiCampaignManagerBridge.m +3 -2
- package/ios/NamiCampaignManagerBridge.swift +16 -11
- package/ios/NamiCustomerManager.m +3 -2
- package/ios/NamiCustomerManager.swift +44 -21
- package/ios/NamiEntitlementManagerBridge.m +3 -2
- package/ios/NamiEntitlementManagerBridge.swift +14 -12
- package/ios/NamiFlowManagerBridge.m +1 -1
- package/ios/NamiFlowManagerBridge.swift +17 -22
- package/ios/NamiOverlayControlBridge.m +17 -0
- package/ios/NamiOverlayControlBridge.swift +132 -0
- package/ios/NamiPaywallManagerBridge.m +2 -2
- package/ios/NamiPaywallManagerBridge.swift +19 -20
- package/ios/NamiPurchaseManagerBridge.m +2 -2
- package/ios/NamiPurchaseManagerBridge.swift +17 -8
- package/package.json +10 -3
- package/react-native-nami-sdk.podspec +19 -9
- package/specs/NativeNamiFlowManager.ts +1 -0
- package/specs/NativeNamiOverlayControl.ts +9 -0
- package/src/NamiOverlayControl.tsx +48 -0
- package/src/version.ts +1 -1
|
@@ -21,20 +21,30 @@ Pod::Spec.new do |s|
|
|
|
21
21
|
s.requires_arc = true
|
|
22
22
|
s.swift_version = '5.0' # or your supported version
|
|
23
23
|
|
|
24
|
-
s.dependency 'Nami', '3.3.
|
|
24
|
+
s.dependency 'Nami', '3.3.3.2'
|
|
25
25
|
s.dependency 'React'
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
pod_target_xcconfig = {
|
|
28
|
+
'DEFINES_MODULE' => 'YES',
|
|
29
|
+
'SWIFT_VERSION' => '5.0'
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
35
|
-
s.pod_target_xcconfig = {
|
|
32
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
33
|
+
pod_target_xcconfig.merge!({
|
|
36
34
|
'USE_HEADERMAP' => 'YES',
|
|
35
|
+
'OTHER_SWIFT_FLAGS' => '$(inherited) -DRCT_NEW_ARCH_ENABLED',
|
|
36
|
+
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1 RCT_NEW_ARCH_ENABLED=1',
|
|
37
|
+
'OTHER_CFLAGS' => '$(inherited) -DRCT_NEW_ARCH_ENABLED',
|
|
38
|
+
'OTHER_CPLUSPLUSFLAGS' => '$(inherited) -DRCT_NEW_ARCH_ENABLED'
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
# Optional: Swift flag for user target
|
|
42
|
+
s.user_target_xcconfig = {
|
|
43
|
+
'OTHER_SWIFT_FLAGS' => '$(inherited) -DRCT_NEW_ARCH_ENABLED'
|
|
37
44
|
}
|
|
38
|
-
|
|
45
|
+
end
|
|
39
46
|
|
|
47
|
+
s.pod_target_xcconfig = pod_target_xcconfig
|
|
48
|
+
|
|
49
|
+
install_modules_dependencies(s)
|
|
40
50
|
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export interface Spec extends TurboModule {
|
|
5
|
+
presentOverlay(): Promise<void>;
|
|
6
|
+
finishOverlay(result?: { [key: string]: unknown } | null): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('RNNamiOverlayControl');
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AppRegistry, View, StyleSheet } from 'react-native';
|
|
2
|
+
import {
|
|
3
|
+
TurboModuleRegistry,
|
|
4
|
+
NativeModules,
|
|
5
|
+
NativeEventEmitter,
|
|
6
|
+
} from 'react-native';
|
|
7
|
+
import type { Spec } from '../specs/NativeNamiOverlayControl';
|
|
8
|
+
|
|
9
|
+
const RNNamiOverlayControl: Spec =
|
|
10
|
+
TurboModuleRegistry.getEnforcing?.<Spec>('RNNamiOverlayControl') ??
|
|
11
|
+
NativeModules.RNNamiOverlayControl;
|
|
12
|
+
|
|
13
|
+
const emitter = new NativeEventEmitter(NativeModules.RNNamiOverlayControl);
|
|
14
|
+
|
|
15
|
+
export const NamiOverlayControl = {
|
|
16
|
+
emitter,
|
|
17
|
+
|
|
18
|
+
presentOverlay(): Promise<void> {
|
|
19
|
+
return RNNamiOverlayControl.presentOverlay();
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
finishOverlay(result?: any): Promise<void> {
|
|
23
|
+
return RNNamiOverlayControl.finishOverlay(result ?? null);
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
onOverlayReady(handler: () => void) {
|
|
27
|
+
const sub = emitter.addListener('NamiOverlayReady', handler);
|
|
28
|
+
return () => sub.remove();
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
onOverlayResult(handler: (result: any) => void) {
|
|
32
|
+
const sub = emitter.addListener('NamiOverlayResult', handler);
|
|
33
|
+
return () => sub.remove();
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default function NamiOverlayHost() {
|
|
38
|
+
return <View style={styles.overlay} />;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
overlay: {
|
|
43
|
+
flex: 1,
|
|
44
|
+
backgroundColor: 'transparent',
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
AppRegistry.registerComponent('NamiOverlayHost', () => NamiOverlayHost);
|
package/src/version.ts
CHANGED