[Bug]: Issue with `Permission.location.request()` Returning `isPermanentlyDenied` on iPhone 13 Mini with iOS 17.5.1
Please check the following before submitting a new issue.
- [ ] I have searched the existing issues.
- [X] I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
- [ ] Android
- [X] iOS
- [ ] Windows
Steps to reproduce
-
add necessary permissions are deployed in the app’s Info.plist file as outlined below:
-
call
dart
Future<bool> requestLocationPermission() async {
var status = await Permission.location.request();
return status.isGranted;
}
- Build and run the project on an iPhone 13 Mini with iOS 17.5.1.
Expected results
The app should successfully return the WiFi name and BSSID of the connected network.
Actual results
PermissionStatus always return permanentlyDenied.
Code sample
Code sample
Future<bool> requestLocationPermission() async {
var status = await Permission.location.request();
print('status: $status');
return status.isGranted;
}
Screenshots or video
Screenshots or video demonstration
[Upload media here]
Version
11.3.1
Flutter Doctor output
Doctor output
[!] Flutter (Channel stable, 3.22.4-0.0.pre.1, on macOS 14.5 23F79 darwin-arm64, locale
zh-Hant-TW)
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google
Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.92.2)
[✓] Connected device (3 available)
! Error: Browsing on the local area network for Alvin的iPad. Ensure the device is
unlocked and attached with a cable or associated with the same local area network as
this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources
Dear @SD19767,
I think that you forgot to add the required macros to the podfile. Please check 'Setup' 'iOS' section in the README. I'll close this issue for now.
Kind regards,
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.