Skip to content

IOS getLocationAuthorizationStatus permissionStatus.GRANTED #454

Open
@golyo

Description

Bug report

CHECKLIST

  • I have reproduced the issue using the example project or provided the necessary information to reproduce the 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

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 in AndroidManifest.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

271797140_474468097421276_6049083327979679923_n-1

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:

Metadata

Assignees

No one assigned

    Labels

    caveatA caveat of using this pluginiosrelates to iOS platform

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions