react-native-onesignal
Advanced tools
Comparing version 3.3.2 to 3.3.3
58
index.js
@@ -101,3 +101,7 @@ | ||
if (type === IN_APP_MESSAGE_CLICKED_EVENT) { | ||
RNOneSignal.initInAppMessageClickHandlerParams(); | ||
if (Platform.OS === 'android') { | ||
RNOneSignal.initInAppMessageClickHandlerParams(); | ||
} else if (Platform.OS === 'ios') { | ||
RNOneSignal.setInAppMessageClickHandler(); | ||
} | ||
} | ||
@@ -113,3 +117,3 @@ | ||
static removeEventListener(type, handler) { | ||
static removeEventListener(type) { | ||
if (!checkIfInitialized()) return; | ||
@@ -414,4 +418,6 @@ | ||
/** | ||
* Pass a String key and any value and creates a trigger map to pass to addTriggers() | ||
* In-App Messaging | ||
*/ | ||
// Pass a String key and any value and creates a trigger map to pass to addTriggers() | ||
static addTrigger(key, value) { | ||
@@ -422,20 +428,11 @@ if (!checkIfInitialized()) return; | ||
trigger[key] = value; | ||
if (Platform.OS === 'android') { | ||
RNOneSignal.addTriggers(trigger); | ||
} else { | ||
console.log("This function is not yet implemented on iOS"); | ||
} | ||
RNOneSignal.addTriggers(trigger); | ||
} | ||
/** | ||
* Expected format is Map<String, Object>, make sure all values are Objects and keys are Strings | ||
*/ | ||
// Expected format is Map<String, Object>, make sure all values are Objects and keys are Strings | ||
static addTriggers(triggers) { | ||
if (!checkIfInitialized()) return; | ||
if (Platform.OS === 'android') { | ||
RNOneSignal.addTriggers(triggers); | ||
} else { | ||
console.log("This function is not yet implemented on iOS"); | ||
} | ||
RNOneSignal.addTriggers(triggers); | ||
} | ||
@@ -446,7 +443,3 @@ | ||
if (Platform.OS === 'android') { | ||
RNOneSignal.removeTriggersForKeys(keys); | ||
} else { | ||
console.log("This function is not yet implemented on iOS"); | ||
} | ||
RNOneSignal.removeTriggersForKeys(keys); | ||
} | ||
@@ -457,19 +450,10 @@ | ||
if (Platform.OS === 'android') { | ||
RNOneSignal.removeTriggerForKey(key); | ||
} else { | ||
console.log("This function is not yet implemented on iOS"); | ||
} | ||
RNOneSignal.removeTriggerForKey(key); | ||
} | ||
static getTriggerValueForKey(key) { | ||
if (!checkIfInitialized()) return; | ||
// must return a promise | ||
if (!checkIfInitialized()) return Promise.resolve(); | ||
// returns promise | ||
if (Platform.OS === 'android') { | ||
return RNOneSignal.getTriggerValueForKey(key); | ||
} else { | ||
console.log("This function is not yet implemented on iOS"); | ||
} | ||
return Promise.resolve(null); | ||
return RNOneSignal.getTriggerValueForKey(key); | ||
} | ||
@@ -480,9 +464,5 @@ | ||
if (Platform.OS === 'android') { | ||
RNOneSignal.pauseInAppMessages(pause); | ||
} else { | ||
console.log("This function is not yet implemented on iOS"); | ||
} | ||
RNOneSignal.pauseInAppMessages(pause); | ||
} | ||
} |
{ | ||
"name": "react-native-onesignal", | ||
"version": "3.3.2", | ||
"description": "React Native OneSignal Component", | ||
"version": "3.3.3", | ||
"description": "React Native OneSignal SDK", | ||
"main": "index", | ||
@@ -30,4 +30,4 @@ "scripts": { | ||
}, | ||
"author": "Geektime <http://www.geektime.co.il>", | ||
"author": "OneSignal, Geektime <http://www.geektime.co.il>", | ||
"license": "MIT" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14742159
32
357
2