Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.49 KB

INSTALL-IOS-RNPM.md

File metadata and controls

38 lines (25 loc) · 1.49 KB

iOS Installation with react-native link

$ npm install --save react-native-background-geolocation

With React Native 0.27+

react-native link react-native-background-geolocation
react-native link react-native-background-fetch
react-native link cocoa-lumberjack

With older versions of React Native

You need rnpm (npm install -g rnpm)

rnpm link react-native-background-geolocation-android
rnpm link react-native-background-fetch
rnpm link cocoa-lumberjack

XCode Configuration

  • Edit Info.plist. The plugin adds default values for the following plist elements. You will need to change these values as desired.
Key Value Description
NSLocationAlwaysUsageDescription This app requires background tracking Deprecated in iOS 11 The value here will be presented to the user when the plugin requests Background Location permission
NSLocationAlwaysAndWhenInUseUsageDescription This app requires background tracking New for iOS 11 The value here will be presented to the user when the plugin requests Background Location permission
NSMotionUsageDescription Accelerometer use increases battery efficiency by intelligently toggling location-tracking The value here will be presented to the user when the app requests Motion Activity permission.