Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.2.1.1 #335

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/app_stg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>()?.let { commandsFromReact ->
settingsList.addAll(commandsFromReact)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ class NamiPaywallManagerBridgeModule(reactContext: ReactApplicationContext) :
NamiPaywallManager.setAppSuppliedVideoDetails(url = url, name = name)
}

@ReactMethod
fun clearAppSuppliedVideoDetails() {
NamiPaywallManager.clearAppSuppliedVideoDetails()
}

@ReactMethod
fun addListener(eventName: String?) {
}
Expand Down
2 changes: 1 addition & 1 deletion ios/Nami.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down
4 changes: 2 additions & 2 deletions ios/NamiCampaignManagerBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions ios/NamiPaywallManagerBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
7 changes: 7 additions & 0 deletions ios/NamiPaywallManagerBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/NamiPaywallManager.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ export interface INamiPaywallManager {
isPaywallOpen: () => Promise<boolean>;
setProductDetails: (productDetails: string, allowOffers: boolean) => void;
setAppSuppliedVideoDetails: (url: string, name?: string) => void;
clearAppSuppliedVideoDetails: () => void;
}
export declare const NamiPaywallManager: INamiPaywallManager;
4 changes: 4 additions & 0 deletions src/NamiPaywallManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface INamiPaywallManager {
isPaywallOpen: () => Promise<boolean>;
setProductDetails: (productDetails: string, allowOffers: boolean) => void;
setAppSuppliedVideoDetails: (url: string, name?: string) => void;
clearAppSuppliedVideoDetails: () => void;
}

const { NamiPaywallManagerBridge, RNNamiPaywallManager } = NativeModules;
Expand Down Expand Up @@ -168,4 +169,7 @@ export const NamiPaywallManager: INamiPaywallManager = {
setAppSuppliedVideoDetails: (url: string, name?: string) => {
RNNamiPaywallManager.setAppSuppliedVideoDetails(url, name);
},
clearAppSuppliedVideoDetails: () => {
RNNamiPaywallManager.clearAppSuppliedVideoDetails();
},
};
Loading