Skip to content
New issue

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

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

Already on GitHub? # to your account

OpenIssue #581Handling PermissionRequestInProgressException on iOS fixed #1217

Conversation

Abisheik-IAN
Copy link

@Abisheik-IAN Abisheik-IAN commented Feb 13, 2023

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

It return is removed from the ios native permissionhandle.m

⤵️ What is the current behavior?

🆕 What is the new behavior (if this is a feature change)?

In the permission request the popup appears and once the mobile locked then the popup disappear and the click will not do anything(thing is the await function waiting for the response from popup but the popup disappear(it is default iOS fn).

💥 Does this PR introduce a breaking change?

🐛 Recommendations for testing

📝 Links to relevant issues/docs

#581

🤔 Checklist before submitting

  • I made sure all projects build.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I followed the style guide lines (code style guide).
  • I updated the relevant documentation.
  • I rebased onto current master.

@@ -54,7 +54,6 @@ - (void) requestPermission:(PermissionConfirmation)confirmationHandler
// Permission request is already running, return immediatly with error
errorHandler(GeolocatorErrorPermissionRequestInProgress,
@"A request for location permissions is already running, please wait for it to complete before doing another request.");
return;
Copy link

@Dolar1 Dolar1 Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried removing return and giving local ref in yaml but it still get's produced.

@mvanbeusekom
Copy link
Member

Closing this PR as this is not the correct way to resolve the issue.

The error is caused when people dismis the permission dialog or put the application in the background while the permission dialog is showing. Unfortunately the iOS doesn't inform the geolocator (nor any other application) that the dialog is dismissed and therefore the geolocator keeps the result object active causing the error.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants