react-native-branch
Advanced tools
Comparing version 0.4.1 to 0.5.0
{ | ||
"name": "react-native-branch", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "Branch Metrics React Native SDK", | ||
@@ -37,4 +37,4 @@ "main": "src/index.js", | ||
"authors": [ | ||
"Zack Story <zack@root-two.com> (https://github.com/rt2zz)", | ||
"Kevin Stumpf (https://github.com/kevinstumpf)" | ||
"Zack Story <zack@root-two.com> (https://github.com/rt2zz)", | ||
"Kevin Stumpf (https://github.com/kevinstumpf)" | ||
], | ||
@@ -41,0 +41,0 @@ "license": "MIT", |
@@ -1,5 +0,8 @@ | ||
import { NativeModules, NativeEventEmitter, DeviceEventEmitter, Platform } from 'react-native' | ||
import { NativeModules, NativeAppEventEmitter, 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 | ||
@@ -6,0 +9,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
71006
97