[Bug]: Update deployment target to 11+
Please check the following before submitting a new issue.
- [x] 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
- [ ] iOS
- [ ] Linux
- [x] macOS
- [ ] Web
- [ ] Windows
Steps to reproduce
Cannot get location services to work on latest macOS. s.osx.deployment_target = '10.11'. Warnings about deprecated authorizationStatus. "The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.11, but the range of supported deployment target versions is 10.13 to 15.4.99."
Should the deployment target be upped to 11+?
Expected results
Permission granted
Actual results
"User denied permissions to access the device's location."
Code sample
bool serviceEnabled = false;
LocationPermission permission;
String locationServiceStatus = '';
String locationWhenInUseStatus = '';
// Test if location services are enabled.
serviceEnabled = await Geolocator.isLocationServiceEnabled();
// Set the location service status
locationServiceStatus = (serviceEnabled) ? 'Enabled' : 'Disabled';
if (!serviceEnabled) {
locationWhenInUseStatus = 'Unknown';
} else {
permission = await Geolocator.checkPermission();
if (permission == LocationPermission.denied) {
// Request permission
permission = await Geolocator.requestPermission();
}
switch (permission) {
case LocationPermission.denied:
locationWhenInUseStatus = 'Denied';
break;
case LocationPermission.deniedForever:
locationWhenInUseStatus = 'Denied Forever';
break;
case LocationPermission.always:
locationWhenInUseStatus = 'Always';
break;
case LocationPermission.whileInUse:
locationWhenInUseStatus = 'When In Use';
break;
default:
locationWhenInUseStatus = 'Unknown';
}
}
if (locationWhenInUseStatus == 'Always' || locationWhenInUseStatus == 'When In Use'){
// Finally get current location
final Position position = await Geolocator.getCurrentPosition();
// Save the location details
double latitude = position.latitude;
double longitude = position.longitude;
double altitude = position.altitude;
}
Screenshots or video
Screenshots or video demonstration
[Upload media here]
Version
13.0.4
Flutter Doctor output
[✓] Flutter (Channel stable, 3.29.2, on macOS 15.3.2 24D81 darwin-arm64, locale en-US) [1,029ms] • Flutter version 3.29.2 on channel stable at /Users/michaelupchurch/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision c236373904 (4 weeks ago), 2025-03-13 16:17:06 -0400 • Engine revision 18b71d647a • Dart version 3.7.2 • DevTools version 2.42.3
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [2.5s]
• Android SDK at /Users/michaelupchurch/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: flutter config --jdk-dir="path/to/jdk".
• Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [1,459ms] • Xcode at /Applications/Xcode.app/Contents/Developer • Build 16E140 • CocoaPods version 1.16.2
[✓] Chrome - develop for the web [11ms] • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.2) [11ms] • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
[✓] VS Code (version 1.99.0) [8ms] • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.108.0
[✓] Connected device (4 available) [11.6s] • iPadMike (mobile) • 00008027-001939382631002E • ios • iOS 18.3.2 22D82 • macOS (desktop) • macos • darwin-arm64 • macOS 15.3.2 24D81 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.3.2 24D81 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 135.0.7049.42
[✓] Network resources [880ms] • All expected network resources are available.
• No issues found!
Dear @aetherity,
When I do a flutter build macOS it updates the platform :osx, to '10.14'. Perhaps this helps. Maybe you can do a flutter clean flutter build macos.
Kind regards,
I have the same problem. After flutter clean and flutter build macos, the error continues the same.
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.