Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.61k stars 292 forks source link

Geolocation.requestAuthorization() is void in return #262

Closed luZheng-1122 closed 3 years ago

luZheng-1122 commented 3 years ago

I am checking the geo permission in iOS by calling Geolocation.requestAuthorization(). From the documentation, it should return status to indicate whether the permission is 'granted', 'denied', or 'disabled'. But the package describes the function will have a void return.

I am following the example here: https://github.com/Agontuk/react-native-geolocation-service/blob/master/example/src/App.js

Can someone tell what's wrong here? How can I get the iOS permission? Thanks!

Package version: "react-native-geolocation-service": "^4.0.2", iOS: 14.4.2

Agontuk commented 3 years ago

You're using an old version, it's only available in 5.0+ versions.

luZheng-1122 commented 3 years ago

thank you!