8000 [Bug]: Update deployment target to 11+ · Issue #1680 · Baseflow/flutter-geolocator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Bug]: Update deployment target to 11+ #1680

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

Open
3 of 8 tasks
aetherity opened this issue Apr 8, 2025 · 2 comments
Open
3 of 8 tasks

[Bug]: Update deployment target to 11+ #1680

aetherity opened this issue Apr 8, 2025 · 2 comments

Comments

@aetherity
Copy link

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Linux
  • 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!

@TimHoogstrate
Copy link
Contributor

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,

@TimHoogstrate TimHoogstrate added the status: needs more info We need more information before we can continue work on this issue. label Apr 9, 2025
@dumabg
Copy link
dumabg commented Apr 18, 2025

I have the same problem. After flutter clean and flutter build macos, the error continues the same.

@github-actions github-actions bot removed the status: needs more info We need more information before we can continue work on this issue. label Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0