react-native-onesignal
Advanced tools
Comparing version 3.4.2 to 3.5.0
55
index.js
'use strict'; | ||
import { NativeModules, NativeEventEmitter, NetInfo, Platform } from 'react-native'; | ||
import { NativeModules, NativeEventEmitter, Platform } from 'react-native'; | ||
import invariant from 'invariant'; | ||
@@ -438,3 +438,3 @@ | ||
// Expected format is Map<String, Object>, make sure all values are Objects and keys are Strings | ||
@@ -472,2 +472,53 @@ static addTriggers(triggers) { | ||
/** | ||
* Outcomes | ||
*/ | ||
static sendOutcome(name, callback=()=>{}) { | ||
if (!checkIfInitialized()) return; | ||
if (Platform.OS === "ios") { | ||
console.warn("OneSignal.sendOutcome is not yet supported on iOS"); | ||
return; | ||
} | ||
invariant( | ||
typeof callback === 'function', | ||
'Must provide a valid callback' | ||
); | ||
RNOneSignal.sendOutcome(name, callback); | ||
} | ||
static sendUniqueOutcome(name, callback=()=>{}) { | ||
if (!checkIfInitialized()) return; | ||
if (Platform.OS === "ios") { | ||
console.warn("OneSignal.sendUniqueOutcome is not yet supported on iOS"); | ||
return; | ||
} | ||
invariant( | ||
typeof callback === 'function', | ||
'Must provide a valid callback' | ||
); | ||
RNOneSignal.sendUniqueOutcome(name, callback); | ||
} | ||
static sendOutcomeWithValue(name, value, callback=()=>{}) { | ||
if (!checkIfInitialized()) return; | ||
if (Platform.OS === "ios") { | ||
console.warn("OneSignal.sendOutcomeWithValue is not yet supported on iOS"); | ||
return; | ||
} | ||
invariant( | ||
typeof callback === 'function', | ||
'Must provide a valid callback' | ||
); | ||
RNOneSignal.sendOutcomeWithValue(name, Number(value), callback); | ||
} | ||
} |
{ | ||
"name": "react-native-onesignal", | ||
"version": "3.4.2", | ||
"version": "3.5.0", | ||
"description": "React Native OneSignal SDK", | ||
@@ -20,2 +20,3 @@ "main": "index", | ||
"apns", | ||
"fcm", | ||
"gcm", | ||
@@ -25,10 +26,10 @@ "onesignal" | ||
"bugs": { | ||
"url": "https://github.com/geektimecoil/react-native-onesignal/issues" | ||
"url": "https://github.com/OneSignal/react-native-onesignal/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/geektimecoil/react-native-onesignal" | ||
"url": "https://github.com/OneSignal/react-native-onesignal" | ||
}, | ||
"author": "OneSignal, Geektime <http://www.geektime.co.il>", | ||
"author": "OneSignal <https://www.onesignal.com>, Geektime <http://www.geektime.co.il>", | ||
"license": "MIT" | ||
} |
@@ -13,9 +13,9 @@ <p align="center"> | ||
#### Installation | ||
See the [Setup Guide](https://documentation.onesignal.com/v5.0/docs/react-native-sdk-setup) for setup instructions. | ||
See the [Setup Guide](https://documentation.onesignal.com/docs/react-native-sdk-setup) for setup instructions. | ||
#### Change Log | ||
See this repository's [release tags](https://github.com/geektimecoil/react-native-onesignal/releases) for a complete change log of every released version. | ||
See this repository's [release tags](https://github.com/OneSignal/react-native-onesignal/releases) for a complete change log of every released version. | ||
#### Support | ||
Please visit this repository's [Github issue tracker](https://github.com/geektimecoil/react-native-onesignal/issues) for feature requests and bug reports related specifically to the SDK. | ||
Please visit this repository's [Github issue tracker](https://github.com/OneSignal/react-native-onesignal/issues) for feature requests and bug reports related specifically to the SDK. | ||
For account issues and support please contact OneSignal support from the [OneSignal.com](https://onesignal.com) dashboard. | ||
@@ -22,0 +22,0 @@ |
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
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
10631807
404