diff --git a/.github/workflows/app_stg.yaml b/.github/workflows/app_stg.yaml index 9370a8ea..776e2a16 100644 --- a/.github/workflows/app_stg.yaml +++ b/.github/workflows/app_stg.yaml @@ -46,7 +46,7 @@ jobs: cache: gradle distribution: temurin java-version: 17 - + - name: Install Google API python client run: | pip install google-api-python-client diff --git a/android/src/main/java/com/nami/reactlibrary/NamiBridgeModule.kt b/android/src/main/java/com/nami/reactlibrary/NamiBridgeModule.kt index 5de508bb..dbdfaab6 100644 --- a/android/src/main/java/com/nami/reactlibrary/NamiBridgeModule.kt +++ b/android/src/main/java/com/nami/reactlibrary/NamiBridgeModule.kt @@ -106,7 +106,7 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) : } else { Arguments.createArray() } - val settingsList = mutableListOf("extendedClientInfo:react-native:3.2.1") + val settingsList = mutableListOf("extendedClientInfo:react-native:3.2.1.1") namiCommandsReact?.toArrayList()?.filterIsInstance()?.let { commandsFromReact -> settingsList.addAll(commandsFromReact) } diff --git a/android/src/main/java/com/nami/reactlibrary/NamiPaywallManagerBridgeModule.kt b/android/src/main/java/com/nami/reactlibrary/NamiPaywallManagerBridgeModule.kt index f13b5df6..754dd1ba 100644 --- a/android/src/main/java/com/nami/reactlibrary/NamiPaywallManagerBridgeModule.kt +++ b/android/src/main/java/com/nami/reactlibrary/NamiPaywallManagerBridgeModule.kt @@ -230,6 +230,11 @@ class NamiPaywallManagerBridgeModule(reactContext: ReactApplicationContext) : NamiPaywallManager.setAppSuppliedVideoDetails(url = url, name = name) } + @ReactMethod + fun clearAppSuppliedVideoDetails() { + NamiPaywallManager.clearAppSuppliedVideoDetails() + } + @ReactMethod fun addListener(eventName: String?) { } diff --git a/ios/Nami.m b/ios/Nami.m index 1507d0a7..c67e7467 100644 --- a/ios/Nami.m +++ b/ios/Nami.m @@ -50,7 +50,7 @@ @implementation NamiBridge (RCTExternModule) } // Start commands with header iformation for Nami to let them know this is a React client. - NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.2.1"]]; + NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.2.1.1"]]; // Add additional namiCommands app may have sent in. NSObject *appCommandStrings = configDict[@"namiCommands"]; diff --git a/ios/NamiCampaignManagerBridge.swift b/ios/NamiCampaignManagerBridge.swift index 75806e7e..41a52594 100644 --- a/ios/NamiCampaignManagerBridge.swift +++ b/ios/NamiCampaignManagerBridge.swift @@ -82,9 +82,9 @@ class RNNamiCampaignManager: RCTEventEmitter { case .slide_change: actionString = "SLIDE_CHANGE" case .nami_collapsible_drawer_open: - actionString = "COLLAPSIBLE_DRAWER_OPEN" + actionString = "COLLAPSIBLE_DRAWER_OPEN" case .nami_collapsible_drawer_close: - actionString = "COLLAPSIBLE_DRAWER_CLOSE" + actionString = "COLLAPSIBLE_DRAWER_CLOSE" case .video_play: actionString = "VIDEO_STARTED" case .video_pause: diff --git a/ios/NamiPaywallManagerBridge.m b/ios/NamiPaywallManagerBridge.m index 7baa7516..7a0f74d4 100644 --- a/ios/NamiPaywallManagerBridge.m +++ b/ios/NamiPaywallManagerBridge.m @@ -43,6 +43,8 @@ @interface RCT_EXTERN_MODULE(RNNamiPaywallManager, NSObject) RCT_EXTERN_METHOD(setAppSuppliedVideoDetails:(NSString *)url name:(nullable NSString *)) +RCT_EXTERN_METHOD(clearAppSuppliedVideoDetails) + + (BOOL)requiresMainQueueSetup { return YES; } diff --git a/ios/NamiPaywallManagerBridge.swift b/ios/NamiPaywallManagerBridge.swift index 65e54cc6..3685f452 100644 --- a/ios/NamiPaywallManagerBridge.swift +++ b/ios/NamiPaywallManagerBridge.swift @@ -162,4 +162,11 @@ class RNNamiPaywallManager: RCTEventEmitter { func setAppSuppliedVideoDetails(url: String, name: String?) { NamiPaywallManager.setAppSuppliedVideoDetails(url: url, name: name) } + + @objc(clearAppSuppliedVideoDetails) + func clearAppSuppliedVideoDetails() { + DispatchQueue.main.async { + NamiPaywallManager.clearAppSuppliedVideoDetails() + } + } } diff --git a/package.json b/package.json index baa534a0..15f75c3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-nami-sdk", - "version": "3.2.1", + "version": "3.2.1-1", "description": "React Native Module for Nami - Easy subscriptions & in-app purchases, with powerful built-in paywalls and A/B testing.", "main": "index.ts", "types": "index.d.ts", diff --git a/src/NamiPaywallManager.d.ts b/src/NamiPaywallManager.d.ts index eea6815d..49ebe843 100644 --- a/src/NamiPaywallManager.d.ts +++ b/src/NamiPaywallManager.d.ts @@ -29,5 +29,6 @@ export interface INamiPaywallManager { isPaywallOpen: () => Promise; setProductDetails: (productDetails: string, allowOffers: boolean) => void; setAppSuppliedVideoDetails: (url: string, name?: string) => void; + clearAppSuppliedVideoDetails: () => void; } export declare const NamiPaywallManager: INamiPaywallManager; diff --git a/src/NamiPaywallManager.ts b/src/NamiPaywallManager.ts index f79a491e..b2f74646 100644 --- a/src/NamiPaywallManager.ts +++ b/src/NamiPaywallManager.ts @@ -51,6 +51,7 @@ export interface INamiPaywallManager { isPaywallOpen: () => Promise; setProductDetails: (productDetails: string, allowOffers: boolean) => void; setAppSuppliedVideoDetails: (url: string, name?: string) => void; + clearAppSuppliedVideoDetails: () => void; } const { NamiPaywallManagerBridge, RNNamiPaywallManager } = NativeModules; @@ -168,4 +169,7 @@ export const NamiPaywallManager: INamiPaywallManager = { setAppSuppliedVideoDetails: (url: string, name?: string) => { RNNamiPaywallManager.setAppSuppliedVideoDetails(url, name); }, + clearAppSuppliedVideoDetails: () => { + RNNamiPaywallManager.clearAppSuppliedVideoDetails(); + }, };