Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.99 KB

INSTALL-IOS-RNPM.md

File metadata and controls

50 lines (33 loc) · 1.99 KB

iOS Installation with react-native link

react-native <= 0.59

With yarn

yarn add https://github.com/transistorsoft/react-native-background-geolocation-android.git

With npm

npm install git+https://[email protected]:transistorsoft/react-native-background-geolocation-android.git --save

react-native link

react-native link react-native-background-geolocation-android
react-native link react-native-background-fetch

⚠️ For those not using Cocoapods (you should be), where your iOS app does not have a Podfile:

yarn add cocoa-lumberjack
// <or npm>
npm install cocoa-lumberjack

react-native link cocoa-lumberjack

The cocoa-lumberjack package is deprecated — it is no longer required when using Cocoapods. If you have cocoa-lumberjack installed and you're using Cocoapods, remove and unlink 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.