🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-native-onesignal

Package Overview
Dependencies
Maintainers
1
Versions
142
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

to
1.1.2

react-native-onesignal.podspec

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 @@

2

package.json
{
"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