Description
Bug report
CHECKLIST
-
I have read the issue reporting guidelines
-
I confirm this is a suspected bug or issue that will affect other users
- I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
- I have read the documentation thoroughly and it does not help solve my issue.
- I have checked that no similar issues (open or closed) already exist.
Current behavior:
After application deployed and started, I selected the 'Allow while using app' choice as location access on IOS.
The getLocationAuthorizationStatus returns permissionStatus.GRANTED, instead of permissionStatus.GRANTED_WHEN_IN_USE.
After I change to location mode maualy, the selected value will returns the right value to the getLocationAuthorizationStatus function.
But after deploy it is not woking properly.
Expected behavior:
The application should return permissionStatus.GRANTED_WHEN_IN_USE if I select the 'Allow while using app' at first time.
Steps to reproduce:
Screenshots
Environment information
- Cordova CLI version : 10.0.0.
cordova -v
- Cordova platform version: 6.1.1
cordova platform ls
- Plugins & versions installed in project (including this plugin)
cordova plugin ls
- Dev machine OS and version, e.g.
- OSX: IOS 15, IOS 14, macbook IOS simulator
sw_vers
- Windows 10
winver
- OSX: IOS 15, IOS 14, macbook IOS simulator
Runtime issue
- Device details
- e.g. iPhone X, Samsung Galaxy S8, iPhone X Simulator, Pixel XL Emulator
- OS details
- e.g. iOS 12.2, Android 9.0
Android build issue:
- Node JS version
node -v
- Gradle version
ls platforms/android/.gradle
- Target Android SDK version
android:targetSdkVersion
inAndroidManifest.xml
- Android SDK details
sdkmanager --list | sed -e '/Available Packages/q'
iOS build issue:
- Node JS version
node -v
14.17.0
- XCode version
Related code:
insert any relevant code here such as plugin API calls / input parameters
window.cordova.plugins.diagnostic.getLocationAuthorizationStatus((locationPermission) => {
console.log(`Location permission setting is ${locationPermission}`);
}, (err) => {
console.error('Error', err);
});
Console output
Location permission setting is granted
console output
// Paste any relevant JS/native console output here
Other information: