react-native-onesignal
Advanced tools
Comparing version 1.1.1 to 1.1.2
17
index.js
@@ -7,3 +7,3 @@ /** | ||
import { NativeModules, DeviceEventEmitter } from 'react-native'; | ||
import { NativeModules, DeviceEventEmitter, NetInfo } from 'react-native'; | ||
@@ -46,2 +46,7 @@ const { RNOneSignal } = NativeModules; | ||
Notifications.registerForPushNotifications = function(){ | ||
RNOneSignal.registerForPushNotifications(); | ||
} | ||
Notifications._onNotificationOpened = function(message, data, isActive) { | ||
@@ -88,5 +93,11 @@ if ( this.onNotificationOpened === false ) { | ||
Notifications.idsAvailable = function(idsAvailable) { | ||
RNOneSignal.idsAvailable(idsAvailable); | ||
NetInfo.isConnected.fetch().then(isConnected => { | ||
if (isConnected == true) { | ||
RNOneSignal.idsAvailable(idsAvailable); | ||
} | ||
else { | ||
return; | ||
} | ||
}); | ||
} | ||
@@ -93,0 +104,0 @@ |
{ | ||
"name": "react-native-onesignal", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "React Native OneSignal Component", | ||
@@ -5,0 +5,0 @@ "main": "index", |
@@ -71,20 +71,2 @@ # React Native OneSignal | ||
In `node_modules/react-native-onesignal/android/build.gradle` | ||
```gradle | ||
... | ||
android { | ||
... | ||
defaultConfig { | ||
... | ||
manifestPlaceholders = [manifestApplicationId: "${applicationId}", | ||
onesignal_app_id: "YOUR_ONESIGNAL_ID", | ||
onesignal_google_project_number: "YOUR_GOOGLE_PROJECT_NUMBER"] | ||
} | ||
} | ||
``` | ||
That step is neccesary right now due to OneSignal SDK tests being performed at build. until we'll find a better solution you'll have to include this snippet twice, Once in your app build.gradle and in the module build.gradle as well. | ||
Register module (in `MainActivity.java`) | ||
@@ -117,3 +99,3 @@ | ||
* Follow the steps according the official OneSignal SDK Installation here: https://documentation.onesignal.com/docs/installing-the-onesignal-ios-sdk | ||
* Follow the steps according to the official OneSignal SDK Installation here: https://documentation.onesignal.com/docs/installing-the-onesignal-ios-sdk | ||
* Make sure you installed the OneSignal Pod. | ||
@@ -120,0 +102,0 @@ * Once you've finished, Open your project in Xcode. |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
3334846
24
87
299