React-native-geolocation-service: Permission not requested when both NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription on plist

Created on 4 Nov 2019  路  2Comments  路  Source: Agontuk/react-native-geolocation-service

When invoking getCurrentPosition , the permission dialogue is not invoked when both NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription are on the plist.

The problem here is that they both need to be on the .plist because of the very common react-native-permissions library.

This can lead to a scenario like i'm facing where i'm forced to use one of the two. Anyone else facing that or any advice on the subject?


version: any
Device: iphone 6
Ios: 12.3.1

Most helpful comment

Yeah, I also had this issue. You'll need to set authorizationLevel explicitly

    Geolocation.setRNConfiguration({
      authorizationLevel: 'whenInUse',
      skipPermissionRequests: false,
    });

All 2 comments

Yeah, I also had this issue. You'll need to set authorizationLevel explicitly

    Geolocation.setRNConfiguration({
      authorizationLevel: 'whenInUse',
      skipPermissionRequests: false,
    });

Yeah, I also had this issue. You'll need to set authorizationLevel explicitly

    Geolocation.setRNConfiguration({
      authorizationLevel: 'whenInUse',
      skipPermissionRequests: false,
    });

Thank you. Additionally it appears that react-native-permissions v2.x.x now supports individual permissions too so there are more than one solutions to this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lingxiao-Zhu picture lingxiao-Zhu  路  3Comments

chungweileong94 picture chungweileong94  路  5Comments

ShaoGongBra picture ShaoGongBra  路  7Comments

mrozbarry picture mrozbarry  路  3Comments

giovanischiar picture giovanischiar  路  5Comments