Skip to content

[geolocator_apple] Crash if listen/cancel is executed in quick succession #1612

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
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions geolocator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 13.0.3

- Updates dependency on geolocator_apple.

## 13.0.2

- Updates dependency on geolocator_apple to version 2.3.8.
2 changes: 1 addition & 1 deletion geolocator/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ name: geolocator
description: Geolocation plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API for generic location (GPS etc.) functions.
repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator
issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen
version: 13.0.2
version: 13.0.3

environment:
sdk: ">=2.15.0 <4.0.0"
4 changes: 4 additions & 0 deletions geolocator_apple/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.8+2

* Crash if listen/cancel is executed in quick succession

## 2.3.8+1

* HOT FIX: Adds back implementation of the `stopListening` method in the `GeolocationHandler.m` file.
Original file line number Diff line number Diff line change
@@ -37,10 +37,12 @@ - (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatu
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
BOOL isEnabled = [CLLocationManager locationServicesEnabled];
dispatch_async(dispatch_get_main_queue(), ^(void) {
if (isEnabled) {
self->_eventSink([NSNumber numberWithInt:(ServiceStatus)enabled]);
} else {
self->_eventSink([NSNumber numberWithInt:(ServiceStatus)disabled]);
if (_eventSink != nil) {
if (isEnabled) {
self->_eventSink([NSNumber numberWithInt:(ServiceStatus) enabled]);
} else {
self->_eventSink([NSNumber numberWithInt:(ServiceStatus) disabled]);
}
}
});
});
2 changes: 1 addition & 1 deletion geolocator_apple/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ name: geolocator_apple
description: Geolocation Apple plugin for Flutter. This plugin provides the Apple implementation for the geolocator.
repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_apple
issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen
version: 2.3.8+1
version: 2.3.8+2

environment:
sdk: ">=2.15.0 <4.0.0"