Skip to content

Commit

Permalink
[local_auth] Switch iOS endorsement to local_auth_darwin (#6107)
Browse files Browse the repository at this point in the history
Updates to use `local_auth_darwin` instead of the discontinued `local_auth_ios`.
  • Loading branch information
stuartmorgan authored Feb 21, 2024
1 parent 48048f6 commit cd5d7d8
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 21 deletions.
9 changes: 5 additions & 4 deletions packages/local_auth/local_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## NEXT
## 2.2.0

* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
* Switches endorsed iOS implementation to `local_auth_darwin`.
* Clients directly importing `local_auth_ios` for auth strings should switch
dependencies and imports to `local_auth_darwin`. No other change is necessary.
* Updates support matrix in README to indicate that iOS 11 is no longer supported.
* Clients on versions of Flutter that still support iOS 11 can continue to use this
package with iOS 11, but will not receive any further updates to the iOS implementation.
* Updates minimum supported SDK version to Flutter 3.16.6.

## 2.1.8

Expand Down
4 changes: 2 additions & 2 deletions packages/local_auth/local_auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ instance, to customize Android and iOS:
<?code-excerpt "readme_excerpts.dart (CustomMessages)"?>
```dart
import 'package:local_auth_android/local_auth_android.dart';
import 'package:local_auth_ios/local_auth_ios.dart';
import 'package:local_auth_darwin/local_auth_darwin.dart';
// ···
final bool didAuthenticate = await auth.authenticate(
localizedReason: 'Please authenticate to show account balance',
Expand Down Expand Up @@ -281,7 +281,7 @@ the Android theme directly in `android/app/src/main/AndroidManifest.xml`:
<activity
...
android:theme="@style/Theme.AppCompat.DayNight"
...
...
>
</activity>
</application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import 'package:local_auth/local_auth.dart';

// #docregion CustomMessages
import 'package:local_auth_android/local_auth_android.dart';
import 'package:local_auth_ios/local_auth_ios.dart';
import 'package:local_auth_darwin/local_auth_darwin.dart';
// #enddocregion CustomMessages

void main() {
Expand Down
6 changes: 3 additions & 3 deletions packages/local_auth/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: ^3.1.0
flutter: ">=3.13.0"
sdk: ^3.2.3
flutter: ">=3.16.6"

dependencies:
flutter:
Expand All @@ -17,7 +17,7 @@ dependencies:
# the parent directory to use the current plugin's version.
path: ../
local_auth_android: ^1.0.0
local_auth_ios: ^1.0.1
local_auth_darwin: ^1.2.1

dev_dependencies:
build_runner: ^2.1.10
Expand Down
2 changes: 1 addition & 1 deletion packages/local_auth/local_auth/lib/src/local_auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'dart:async';

import 'package:flutter/services.dart';
import 'package:local_auth_android/local_auth_android.dart';
import 'package:local_auth_ios/local_auth_ios.dart';
import 'package:local_auth_darwin/local_auth_darwin.dart';
import 'package:local_auth_platform_interface/local_auth_platform_interface.dart';
import 'package:local_auth_windows/local_auth_windows.dart';

Expand Down
10 changes: 5 additions & 5 deletions packages/local_auth/local_auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@ 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/packages/tree/main/packages/local_auth/local_auth
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22
version: 2.1.8
version: 2.2.0

environment:
sdk: ^3.1.0
flutter: ">=3.13.0"
sdk: ^3.2.3
flutter: ">=3.16.6"

flutter:
plugin:
platforms:
android:
default_package: local_auth_android
ios:
default_package: local_auth_ios
default_package: local_auth_darwin
windows:
default_package: local_auth_windows

dependencies:
flutter:
sdk: flutter
local_auth_android: ^1.0.0
local_auth_ios: ^1.0.1
local_auth_darwin: ^1.2.1
local_auth_platform_interface: ^1.0.1
local_auth_windows: ^1.0.0

Expand Down
2 changes: 1 addition & 1 deletion packages/local_auth/local_auth/test/local_auth_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:local_auth/local_auth.dart';
import 'package:local_auth_android/local_auth_android.dart';
import 'package:local_auth_ios/local_auth_ios.dart';
import 'package:local_auth_darwin/local_auth_darwin.dart';
import 'package:local_auth_platform_interface/local_auth_platform_interface.dart';
import 'package:local_auth_windows/local_auth_windows.dart';
import 'package:mockito/mockito.dart';
Expand Down
4 changes: 0 additions & 4 deletions script/configs/allowed_unpinned_deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

## Explicit allowances

# Temporary during transition to local_auth_darwin. Can be removed once
# the default endorsement changes.
- local_auth_ios

# Owned by individual Flutter Team members.
# Ideally we would not do this, since there's no clear plan for what
# would happen if the individuals left the Flutter Team, and the
Expand Down

0 comments on commit cd5d7d8

Please sign in to comment.