diff --git a/permission_handler_apple/CHANGELOG.md b/permission_handler_apple/CHANGELOG.md index 20a65108..10690376 100644 --- a/permission_handler_apple/CHANGELOG.md +++ b/permission_handler_apple/CHANGELOG.md @@ -1,3 +1,7 @@ +## 9.4.7 + +* Increases minimum iOS version to 9.0 in podspec to match minimum Flutter version. + ## 9.4.6 * Adds the ability to handle `CNAuthorizationStatusLimited` introduced in ios18 diff --git a/permission_handler_apple/ios/Classes/PermissionManager.m b/permission_handler_apple/ios/Classes/PermissionManager.m index a6d708a8..80b66ec6 100644 --- a/permission_handler_apple/ios/Classes/PermissionManager.m +++ b/permission_handler_apple/ios/Classes/PermissionManager.m @@ -86,12 +86,6 @@ + (void)openAppSettings:(FlutterResult)result { completionHandler:^(BOOL success) { result([[NSNumber alloc] initWithBool:success]); }]; - } else if (@available(iOS 8.0, *)) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - BOOL success = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; - result([[NSNumber alloc] initWithBool:success]); -#pragma clang diagnostic pop } else { result(@false); } diff --git a/permission_handler_apple/ios/Classes/strategies/LocationPermissionStrategy.m b/permission_handler_apple/ios/Classes/strategies/LocationPermissionStrategy.m index a4f6b21f..9bc24edd 100644 --- a/permission_handler_apple/ios/Classes/strategies/LocationPermissionStrategy.m +++ b/permission_handler_apple/ios/Classes/strategies/LocationPermissionStrategy.m @@ -174,36 +174,19 @@ + (PermissionStatus)permissionStatus:(PermissionGroup)permission { + (PermissionStatus)determinePermissionStatus:(PermissionGroup)permission authorizationStatus:(CLAuthorizationStatus)authorizationStatus { - if (@available(iOS 8.0, *)) { - if (permission == PermissionGroupLocationAlways) { - switch (authorizationStatus) { - case kCLAuthorizationStatusNotDetermined: - return PermissionStatusDenied; - case kCLAuthorizationStatusRestricted: - return PermissionStatusRestricted; - case kCLAuthorizationStatusAuthorizedWhenInUse: - case kCLAuthorizationStatusDenied: - return PermissionStatusPermanentlyDenied; - case kCLAuthorizationStatusAuthorizedAlways: - return PermissionStatusGranted; - } - } - + if (permission == PermissionGroupLocationAlways) { switch (authorizationStatus) { case kCLAuthorizationStatusNotDetermined: return PermissionStatusDenied; case kCLAuthorizationStatusRestricted: return PermissionStatusRestricted; + case kCLAuthorizationStatusAuthorizedWhenInUse: case kCLAuthorizationStatusDenied: return PermissionStatusPermanentlyDenied; - case kCLAuthorizationStatusAuthorizedWhenInUse: case kCLAuthorizationStatusAuthorizedAlways: return PermissionStatusGranted; } } - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" switch (authorizationStatus) { case kCLAuthorizationStatusNotDetermined: @@ -212,14 +195,10 @@ + (PermissionStatus)determinePermissionStatus:(PermissionGroup)permission author return PermissionStatusRestricted; case kCLAuthorizationStatusDenied: return PermissionStatusPermanentlyDenied; - case kCLAuthorizationStatusAuthorized: + case kCLAuthorizationStatusAuthorizedWhenInUse: + case kCLAuthorizationStatusAuthorizedAlways: return PermissionStatusGranted; - default: - return PermissionStatusDenied; } - -#pragma clang diagnostic pop - } @end diff --git a/permission_handler_apple/ios/permission_handler_apple.podspec b/permission_handler_apple/ios/permission_handler_apple.podspec index 81210cb8..e904ab82 100644 --- a/permission_handler_apple/ios/permission_handler_apple.podspec +++ b/permission_handler_apple/ios/permission_handler_apple.podspec @@ -16,7 +16,7 @@ Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Andro s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.ios.deployment_target = '8.0' + s.ios.deployment_target = '9.0' s.static_framework = true s.resource_bundles = {'permission_handler_apple_privacy' => ['Resources/PrivacyInfo.xcprivacy']} end diff --git a/permission_handler_apple/pubspec.yaml b/permission_handler_apple/pubspec.yaml index c0a3fb49..1093cb05 100644 --- a/permission_handler_apple/pubspec.yaml +++ b/permission_handler_apple/pubspec.yaml @@ -2,7 +2,7 @@ name: permission_handler_apple description: Permission plugin for Flutter. This plugin provides the iOS API to request and check permissions. repository: https://github.com/baseflow/flutter-permission-handler issue_tracker: https://github.com/Baseflow/flutter-permission-handler/issues -version: 9.4.6 +version: 9.4.7 environment: sdk: ">=2.15.0 <4.0.0"