Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70992

How to implement location permission problem with always on option?

$
0
0

I used IONIC Capacitor/Geoloction module. I want to check and request location permissions.
At first, I added three keys on Info.plst file in XCode Project.

NSLocationAlwaysUsageDescription
description here.
NSLocationAlwaysAndWhenInUseUsageDescription
description here.
NSLocationWhenInUseUsageDescription
description here.

I used this code to check and request permission.

let isLocationAvailable:any
const hasPermissin = await Geolocation.checkPermissions();
if (hasPermissin.location == 'granted'){
    isLocationAvailable = true
}
else{
    let permissionStatus = await Geolocation.requestPermissions()
    isLocationAvailable = permissionStatus.location === 'granted' ? true: false
}

But it displayed only Allow Once, While Using App, Don’t Allow options.
There is no Always On option, How can I fix this problem?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70992

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>