Reputation: 59
I'm developing a macos app and i used flutter geolocator package to get users lat long values. It was working perfectly without any problem but yesterday i upgraded my flutter to 3.22.3 (geolocator version is 'geolocator: ^12.0.0') after that some why, while building my app it started to show those warnings:
/Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/PermissionHandler.m:40:31: warning: 'authorizationStatus' is deprecated: first deprecated in macOS 11.0 [-Wdeprecated-declarations]
return [CLLocationManager authorizationStatus];
^~~~~~~~~~~~~~~~~~~
authorizationStatus
In module 'CoreLocation' imported from /Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/PermissionHandler.h:11:
(CLAuthorizationStatus)authorizationStatus API_DEPRECATED_WITH_REPLACEMENT("-authorizationStatus", ios(4.2, 14.0), macos(10.7, 11.0), watchos(1.0, 7.0), tvos(9.0, 14.0));
^
/Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/PermissionHandler.m:47:65: warning: 'authorizationStatus' is deprecated: first deprecated in macOS 11.0 [-Wdeprecated-declarations]
CLAuthorizationStatus authorizationStatus = CLLocationManager.authorizationStatus;
^~~~~~~~~~~~~~~~~~~
authorizationStatus
In module 'CoreLocation' imported from /Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/PermissionHandler.h:11:
(CLAuthorizationStatus)authorizationStatus API_DEPRECATED_WITH_REPLACEMENT("-authorizationStatus", ios(4.2, 14.0), macos(10.7, 11.0), watchos(1.0, 7.0), tvos(9.0, 14.0));
^
/Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/PermissionHandler.m:47:65: warning: 'authorizationStatus' is deprecated: first deprecated in macOS 11.0 [-Wdeprecated-declarations]
CLAuthorizationStatus authorizationStatus = CLLocationManager.authorizationStatus;
^~~~~~~~~~~~~~~~~~~
authorizationStatus
In module 'CoreLocation' imported from /Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/PermissionHandler.h:11:
(CLAuthorizationStatus)authorizationStatus API_DEPRECATED_WITH_REPLACEMENT("-authorizationStatus", ios(4.2, 14.0), macos(10.7, 11.0), watchos(1.0, 7.0), tvos(9.0, 14.0));
^
/Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/PermissionHandler.m:107:1: warning: implementing deprecated method [-Wdeprecated-implementations]
(void) locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status {
^
In module 'CoreLocation' imported from /Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/PermissionHandler.h:11:
(void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status API_DEPRECATED_WITH_REPLACEMENT("-locationManagerDidChangeAuthorization:", ios(4.2, 14.0), macos(10.7, 11.0), watchos(1.0, 7.0), tvos(9.0, 14.0));
^
4 warnings generated.
/Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/LocationServiceStreamHandler.m:36:1: warning: implementing deprecated method [-Wdeprecated-implementations]
(void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status{
^
In module 'CoreLocation' imported from /Users/MYNAME/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/macos/Classes/Handlers/LocationServiceStreamHandler.m:9:
(void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status API_DEPRECATED_WITH_REPLACEMENT("-locationManagerDidChangeAuthorization:", ios(4.2, 14.0), macos(10.7, 11.0), watchos(1.0, 7.0), tvos(9.0, 14.0));
and when i triger previously working code, it gives LOCATION UPDATE FAILURE:Error reason: (null)Error description: The operation couldn’t be completed. (kCLErrorDomain error 0.)
on console.
my flutter doctor output is:
[✓] Flutter (Channel stable, 3.22.3, on macOS 14.5 23F79 darwin-x64, locale tr-TR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.7)
[✓] VS Code (version 1.85.0)
[✓] Connected device (2 available)
[✓] Network resources
• No issues found!
I would be very happy if someone helps.
Upvotes: 0
Views: 84