Requested changes commit
MODIFY
geolocator/CHANGELOG.md
geolocator/CHANGELOG.md
# 7.2.0
-- iOS 14: Users can now query whether they gave permission for Approximate location fetching or Precise location fetching
+- iOS 14: Users can now query whether they gave permission for Approximate location fetching or Precise location fetching.
# 7.1.1
-- Resolved a 404 error when clicking on the AndroidX migration link in the README.md
+- Resolved a 404 error when clicking on the AndroidX migration link in the README.md.
## 7.1.0

MODIFY
geolocator/README.md
geolocator/README.md
@@ -202,10 +202,9 @@ StreamSubscription<ServiceStatus> serviceStatusStream = Geolocator.getServiceSta
```
**iOS 14+ only**
-To query if a user enabled Approximate location fetching or Precise location fetching, you can call `getLocationAccuracy`.
-This will return a `Future<LocationAccuracyStatus` containing `LocationAccuracyStatus.reduced` if the user has enabled Approximate location fetching and containing `LocationAccuracyStatus.precise` if the user has enabled Precise location fetching.
-When calling `getLocationAccuracy` when the user has not given permission yet, the method will return `LocationAccuracyStatus.reduced` on default.
-If the user uses iOS 13 or below, the method `getLocationAccuracy` will return `LocationAccuracyStatus.precise`, since that is the default value for iOS 13 and below.
+To query if a user enabled Approximate location fetching or Precise location fetching, you can call the `Geolocator().getLocationAccuracy()` method. This will return a `Future<LocationAccuracyStatus>`, which when completed contains a `LocationAccuracyStatus.reduced` if the user has enabled Approximate location fetching or `LocationAccuracyStatus.precise` if the user has enabled Precise location fetching.
+When calling `getLocationAccuracy` before the user has given permission, the method will return `LocationAccuracyStatus.reduced` by default.
+On iOS 13 or below, the method `getLocationAccuracy` will always return `LocationAccuracyStatus.precise`, since that is the default value for iOS 13 and below.
``` dart
import 'package:geolocator/geolocator.dart';

MODIFY
geolocator/ios/Classes/Handlers/LocationAccuracyHandler.m
geolocator/ios/Classes/Handlers/LocationAccuracyHandler.m
#import <CoreLocation/CoreLocation.h>
#import "LocationAccuracyHandler.h"
-@interface LocationAccuracyHandler()
- @property (strong, nonatomic) CLLocationManager *locationManager;
-@end
-
@implementation LocationAccuracyHandler
- (void) getLocationAccuracyWithResult:(FlutterResult)result {
- self.locationManager = [[CLLocationManager alloc] init];
+ CLLocationManager *locationManager = [[CLLocationManager alloc] init];
if (@available(iOS 14, *)) {
- switch ([self.locationManager accuracyAuthorization]) {
+ switch ([locationManager accuracyAuthorization]) {
case CLAccuracyAuthorizationFullAccuracy:
return result([NSNumber numberWithInt:(LocationAccuracy)precise]);
case CLAccuracyAuthorizationReducedAccuracy:

Requested changes commit