[Bug]: Type Conflict When Using AppleSettings in Geolocator Plugin for iOS or location settings #1565
Open
3 of 8 tasks
Labels
status: needs more info
We need more information before we can continue work on this issue.
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
Implement location tracking using the Geolocator plugin in a Flutter app.
Create functions _getCurrentLocationForIOS and _enableLocationUpdatesForIOS using AppleSettings for iOS.
Call these functions on an iOS device to get the current location and enable continuous location updates.
Observe the type conflict and other errors during runtime.
Expected results
Example: The application should retrieve the current location and enable continuous location updates on iOS devices without any type conflicts or runtime errors.
Actual results
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: The operation couldn’t be completed. (kCLErrorDomain error 1.)
#0 GeolocatorApple.getPositionStream. (package:geolocator_apple/src/geolocator_apple.dart:188:9)
#1 Stream.handleError. (dart:async/stream.dart:931:16)
#2 _HandleErrorStream._handleError (dart:async/stream_pipe.dart:269:17)
#3 _ForwardingStreamSubscription._handleError (dart:async/stream_pipe.dart:157:13)
#4 _RootZone.runBinaryGuarded (dart:async/zone.dart:1606:10)
#5 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:384:15)
#6 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:402:7)
#7 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:306:7)
#8 _ForwardingStreamSubscription._addError (dart:async/stream_pipe.dart:128:11)
#9 _ForwardingStream._handleError (dart:async/stream_pipe.dart:95:10)
#10 _ForwardingStream<…>
The application encounters a type conflict and crashes with the error: Unhandled Exception: type '(Position) => Null' is not a subtype of type '((Position) => void)?'. The issue appears when using AppleSettings for iOS in the Geolocator plugin. also when the setting location is on alway or while using the app the location puck shows the first time and disappears and gives this error
Code sample
Code sample
The text was updated successfully, but these errors were encountered: