react-native-branch
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "react-native-branch", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Branch Metrics React Native SDK", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -1,8 +0,5 @@ | ||
import { NativeModules, NativeAppEventEmitter, DeviceEventEmitter, Platform } from 'react-native' | ||
import { NativeModules, NativeEventEmitter, DeviceEventEmitter, Platform } from 'react-native' | ||
// According to the React Native docs from 0.21, NativeAppEventEmitter is used for native iOS modules to emit events. DeviceEventEmitter is used for native Android modules. | ||
// Both are technically supported on Android -- but I chose to follow the suggested route by the documentation to minimize the risk of this code breaking with a future release | ||
// in case NativeAppEventEmitter ever got deprecated on Android | ||
const nativeEventEmitter = Platform.OS === 'ios' ? NativeAppEventEmitter : DeviceEventEmitter | ||
const { RNBranch } = NativeModules | ||
const nativeEventEmitter = Platform.OS === 'ios' ? new NativeEventEmitter(RNBranch) : DeviceEventEmitter | ||
@@ -9,0 +6,0 @@ import createBranchUniversalObject from './branchUniversalObject' |
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
70476
94