Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-onesignal

Package Overview
Dependencies
Maintainers
6
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-onesignal - npm Package Compare versions

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc