Skip to content

Commit

Permalink
Added support for iOS 9 allowsBackgroundLocationUpdates (frostney#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewindso committed Jun 21, 2016
1 parent d726e1c commit c9d1d09
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion RNBeacon.m
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ - (NSString *)stringForProximity:(CLProximity)proximity {
RCT_EXPORT_METHOD(requestAlwaysAuthorization)
{
if ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
[self.locationManager requestAlwaysAuthorization];
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8) {
[self.locationManager requestAlwaysAuthorization];
}
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9) {
self.locationManager.allowsBackgroundLocationUpdates = YES;
}
}
}

Expand Down

0 comments on commit c9d1d09

Please sign in to comment.