Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Permission.locationAlways.request() doesn't work on IOS #1210

Closed
3 of 5 tasks
Ellynnn opened this issue Nov 6, 2023 · 6 comments
Closed
3 of 5 tasks

[Bug]: Permission.locationAlways.request() doesn't work on IOS #1210

Ellynnn opened this issue Nov 6, 2023 · 6 comments
Assignees
Labels
platform: ios Issue is related to the iOS platform status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. status: needs more info We need more information before we can continue work on this issue.

Comments

@Ellynnn
Copy link

Ellynnn commented Nov 6, 2023

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

Check if Permission.locationWhenInUse.isDenied, if yes then request with Permission.locationWhenInUse.request(). If Permission.locationWhenInUse.isGranted then request for locationAlways with Permission.locationAlways.request()

Expected results

Bring user to app location setting page to Allow Location always just like in Android

Actual results

Nothing happened. Directly returned me with a PermissionStatus.permanentlyDenied

Code sample

Code sample
if (await Permission.locationWhenInUse.isDenied) {
    await Permission.locationWhenInUse.request();
    if (await Permission.locationWhenInUse.isGranted) {
     await Permission.locationAlways.request();
      if (await Permission.locationAlways.isDenied) {
        return false;
      }
    }
  }

Screenshots or video

No response

Version

11.0.1

Flutter Doctor output

Doctor output
@Ellynnn Ellynnn closed this as completed Nov 6, 2023
@Ellynnn Ellynnn reopened this Nov 6, 2023
@TimHoogstrate TimHoogstrate self-assigned this Nov 6, 2023
@TimHoogstrate
Copy link
Contributor

Dear @Ellynnn,

I have tested this with the provided example app but it seems to work as expected. What I don't fully understand is why: Bring user to app location setting page should happen. I see a pop-up asking the "always" permission.

Kind regards,

@TimHoogstrate TimHoogstrate added status: needs more info We need more information before we can continue work on this issue. platform: ios Issue is related to the iOS platform labels Nov 6, 2023
@LeonP2ER
Copy link

LeonP2ER commented Nov 6, 2023

I have the same problem as @Ellynnn here. Does not work for me on an iPhone with iOS 17.0.3.

@github-actions github-actions bot removed the status: needs more info We need more information before we can continue work on this issue. label Nov 6, 2023
@LeonP2ER
Copy link

LeonP2ER commented Nov 6, 2023

Seems to be related to / duplicate of #1152.

@TimHoogstrate
Copy link
Contributor

Dear @LeonP2ER,

Can you create a new issue with all the required information like flutter doctor -v and steps to reproduce. Please try the example app to see if it is happening there. It seems to works in the example app with iOS 17.1 with the steps to reproduce.

Kind regards,

@LeonP2ER
Copy link

LeonP2ER commented Nov 6, 2023

@TimHoogstrate I created #1211 :)

@TimHoogstrate TimHoogstrate added the status: needs more info We need more information before we can continue work on this issue. label Nov 7, 2023
Copy link

Without additional information, we are unfortunately not able to resolve this issue. Therefore, we reluctantly closed this issue for now. If you run into this issue later, feel free to file a new issue with a reference to this issue. Add a description of detailed steps to reproduce, expected and current behaviour, logs and the output of 'flutter doctor -v'. Thanks for your contribution.

@github-actions github-actions bot added the status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. label Nov 21, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: ios Issue is related to the iOS platform status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. status: needs more info We need more information before we can continue work on this issue.
Projects
None yet
Development

No branches or pull requests

3 participants