Skip to content

Commit 7c490ce

Browse files
author
Bruz Marzolf
committed
Expose a method to set allowsBackgroundLocationUpdates
Enabling this appears to be necessary in order to have location updates fire when the app is backgrounded, when linking against iOS 9.
1 parent 0eb9806 commit 7c490ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

RNLocation.m

+5
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ - (instancetype)init
6565
self.locationManager.distanceFilter = distance;
6666
}
6767

68+
RCT_EXPORT_METHOD(setAllowsBackgroundLocationUpdates:(BOOL) enabled)
69+
{
70+
self.locationManager.allowsBackgroundLocationUpdates = enabled;
71+
}
72+
6873
RCT_EXPORT_METHOD(startMonitoringSignificantLocationChanges)
6974
{
7075
NSLog(@"react-native-location: startMonitoringSignificantLocationChanges");

0 commit comments

Comments
 (0)