Socket
Socket
Sign inDemoInstall

blueshift-react-native

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blueshift-react-native - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

blueshift-react-native-1.0.2.tgz

49

BlueshiftSampleApp/App.js

@@ -8,3 +8,3 @@ import React, {Component} from 'react';

componentDidMount() {
componentDidMount() {
// Get the email deep link when app launched from killed state

@@ -35,2 +35,4 @@ Linking.getInitialURL().then(url => {

Blueshift.init();
// Add custom event listener using Blueshift method

@@ -496,1 +498,46 @@ Blueshift.addEventListener('PushNotificationClickedEvent', this.handlePushClick);

});
// import React, { useEffect } from 'react';
// const Root = () => {
// Blueshift.identifyWithDetails({});
// useEffect(() => {
// console.log('useEffect: START');
// // Add event listner for `url` event
// global.urlListener = Linking.addEventListener('url', (event) => {
// var url = event.url;
// if(url) {
// // Check if the URL is a rewritten/shortened URL from Blueshift
// if (Blueshift.isBlueshiftUrl(url)) {
// Blueshift.processBlueshiftUrl(url);
// } else {
// console.log('handleDeeplink: ' + url);
// // this.handleDeeplinkUrl(url);
// }
// }
// });
// Blueshift.addEventListener('PushNotificationClickedEvent', () =>{});
// return () => {
// console.log('useEffect: return');
// global.urlListener.remove();
// }
// }, [])
// return (
// <View style={{ flex: 1 }}>
// <Text>Hello</Text>
// </View>
// );
// }
// export default Root;
declare module 'blueshift-react-native' {
/**
* Initialise the plugin components when React Native is ready and loaded.
*
* Usage -
* Blueshift.init();
*/
function init(): void;
/**
* Add event listener for a event name to listen to events fired by Blueshift SDK

@@ -5,0 +13,0 @@ *

@@ -8,2 +8,17 @@ import { DeviceEventEmitter, Linking, NativeEventEmitter, NativeModules, Platform } from 'react-native';

/**
* Initialize the components of the Blueshift SDK. This mainly initializes the
* event emitter instance to start firing the events when the app is ready to
* receive them.
*
* Usage -
* Blueshift.init();
*
*/
init: function() {
if (Platform.OS === 'android') {
NativeModules.BlueshiftBridge.init();
}
},
/**
* Add event listener for a event name to listen to events fired by Blueshift SDK

@@ -10,0 +25,0 @@ *

2

package.json
{
"name": "blueshift-react-native",
"version": "1.0.1",
"version": "1.0.2",
"description": "React native plugin for Blueshift iOS and Android SDK.",

@@ -5,0 +5,0 @@ "main": "index.js",

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