Skip to content

Commit

Permalink
[local_auth] Bump minimum Flutter version and iOS deployment target (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmagman authored Sep 17, 2021
1 parent 701fdb6 commit d5e7763
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 27 deletions.
3 changes: 2 additions & 1 deletion packages/local_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 1.1.8

* Update minimum Flutter SDK to 2.5 and iOS deployment target to 9.0.
* Updated Android lint settings.

## 1.1.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
<string>arm64</string>
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>9.0</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -544,7 +544,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
4 changes: 2 additions & 2 deletions packages/local_auth/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: Demonstrates how to use the local_auth plugin.
publish_to: none

environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"
sdk: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"

dependencies:
flutter:
Expand Down
28 changes: 12 additions & 16 deletions packages/local_auth/ios/Classes/FLTLocalAuthPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,19 @@ - (void)authenticate:(NSDictionary *)arguments withFlutterResult:(FlutterResult)
_lastResult = nil;
context.localizedFallbackTitle = @"";

if (@available(iOS 9.0, *)) {
if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:&authError]) {
[context evaluatePolicy:kLAPolicyDeviceOwnerAuthentication
localizedReason:arguments[@"localizedReason"]
reply:^(BOOL success, NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
[self handleAuthReplyWithSuccess:success
error:error
flutterArguments:arguments
flutterResult:result];
});
}];
} else {
[self handleErrors:authError flutterArguments:arguments withFlutterResult:result];
}
if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:&authError]) {
[context evaluatePolicy:kLAPolicyDeviceOwnerAuthentication
localizedReason:arguments[@"localizedReason"]
reply:^(BOOL success, NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
[self handleAuthReplyWithSuccess:success
error:error
flutterArguments:arguments
flutterResult:result];
});
}];
} else {
// Fallback on earlier versions
[self handleErrors:authError flutterArguments:arguments withFlutterResult:result];
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/local_auth/ios/local_auth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Downloaded by pub (not CocoaPods).
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.platform = :ios, '8.0'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.platform = :ios, '9.0'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
end

6 changes: 3 additions & 3 deletions packages/local_auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ description: Flutter plugin for Android and iOS devices to allow local
authentication via fingerprint, touch ID, face ID, passcode, pin, or pattern.
repository: https://github.com/flutter/plugins/tree/master/packages/local_auth
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22
version: 1.1.7
version: 1.1.8

environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0"
sdk: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"

flutter:
plugin:
Expand Down

0 comments on commit d5e7763

Please sign in to comment.