react-native-onesignal
Advanced tools
Comparing version 4.0.0-beta.3 to 4.0.0-beta.4
{ | ||
"name": "react-native-onesignal", | ||
"version": "4.0.0-beta.3", | ||
"version": "4.0.0-beta.4", | ||
"description": "React Native OneSignal SDK", | ||
"main": "src/index", | ||
"typings": "src/index.d.ts", | ||
"scripts": { | ||
@@ -7,0 +8,0 @@ "test": "echo \"Error: no test specified\" && exit 1" |
@@ -167,5 +167,5 @@ 'use strict'; | ||
static getTags(next) { | ||
static getTags(callback) { | ||
if (!checkIfInitialized(RNOneSignal)) return; | ||
RNOneSignal.getTags(next); | ||
RNOneSignal.getTags(callback); | ||
} | ||
@@ -213,9 +213,5 @@ | ||
static postNotification(contents, data, player_id, otherParameters) { | ||
static postNotification(notificationObjectString, onSuccess=()=>{}, onFailure=()=>{}) { | ||
if (!checkIfInitialized(RNOneSignal)) return; | ||
if (Platform.OS === 'android') | ||
RNOneSignal.postNotification(JSON.stringify(contents), JSON.stringify(data), JSON.stringify(player_id), JSON.stringify(otherParameters)); | ||
else | ||
RNOneSignal.postNotification(contents, data, player_id, otherParameters); | ||
RNOneSignal.postNotification(notificationObjectString, onSuccess, onFailure); | ||
} | ||
@@ -222,0 +218,0 @@ |
@@ -14,3 +14,3 @@ import { NativeModules, Platform } from 'react-native'; | ||
// complete/completion with null to silence the notification | ||
RNOneSignal.completeNotificationEvent(notification.notificationId, false); | ||
RNOneSignal.completeNotificationEvent(this.notification.notificationId, false); | ||
return; | ||
@@ -17,0 +17,0 @@ } |
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
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
22655480
38
813