Skip to content

local_auth_darwin has main actor-isolated swift 6 errors #194594

Closed
flutter/packages
#13296

Description

@jmagman
Testing failed:
	Conformance of 'LocalAuthPlugin' to protocol 'FlutterApplicationLifeCycleDelegate' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode
	Conformance of 'LocalAuthPlugin' to protocol 'FlutterSceneLifeCycleDelegate' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode
	Testing cancelled because the build failed.

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8667765278421871425/+/u/Run_package_tests/native_test/stdout

/Volumes/Work/s/w/ir/x/w/packages/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/LocalAuthPlugin.swift:36:20: error: conformance of 'LocalAuthPlugin' to protocol 'FlutterApplicationLifeCycleDelegate' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode
public final class LocalAuthPlugin: NSObject, FlutterPlugin, LocalAuthApi, @unchecked Sendable {
                   ^
/Volumes/Work/s/w/ir/x/w/packages/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/LocalAuthPlugin.swift:36:20: note: isolate this conformance to the main actor with '@MainActor'
public final class LocalAuthPlugin: NSObject, FlutterPlugin, LocalAuthApi, @unchecked Sendable {
                   ^
                                              @MainActor 
/Volumes/Work/s/w/ir/x/w/packages/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/LocalAuthPlugin.swift:36:20: note: turn data races into runtime errors with '@preconcurrency'
public final class LocalAuthPlugin: NSObject, FlutterPlugin, LocalAuthApi, @unchecked Sendable {
                   ^
                                              @preconcurrency 
/Volumes/Work/s/w/ir/x/w/packages/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/LocalAuthPlugin.swift:279:17: note: main actor-isolated instance method 'applicationDidBecomeActive' cannot satisfy nonisolated requirement
    public func applicationDidBecomeActive(_ application: UIApplication) {
                ^
/Volumes/Work/s/w/ir/x/w/packages/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/LocalAuthPlugin.swift:289:30: error: conformance of 'LocalAuthPlugin' to protocol 'FlutterSceneLifeCycleDelegate' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode
  extension LocalAuthPlugin: FlutterSceneLifeCycleDelegate {}
                             ^
/Volumes/Work/s/w/ir/x/w/packages/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/LocalAuthPlugin.swift:289:30: note: isolate this conformance to the main actor with '@MainActor'
  extension LocalAuthPlugin: FlutterSceneLifeCycleDelegate {}
                             ^
                             @MainActor 
/Volumes/Work/s/w/ir/x/w/packages/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/LocalAuthPlugin.swift:289:30: note: turn data races into runtime errors with '@preconcurrency'
  extension LocalAuthPlugin: FlutterSceneLifeCycleDelegate {}
                             ^
                             @preconcurrency 
/Volumes/Work/s/w/ir/x/w/packages/packages/local_auth/local_auth_darwin/darwin/local_auth_darwin/Sources/local_auth_darwin/LocalAuthPlugin.swift:274:17: note: main actor-isolated instance method 'sceneDidBecomeActive' cannot satisfy nonisolated requirement
    public func sceneDidBecomeActive(_ scene: UIScene) {
                ^

Note this isn't currently being caught in CI due to #194517

Activity

  1. added
    platform-iosiOS applications specifically
    p: local_authPlugin for local authentification
    team-iosOwned by iOS platform team
    on Oct 16, 2026
  2. self-assigned this
    on Oct 16, 2026
  3. github-actions commented on Oct 31, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

p: local_authPlugin for local authentificationplatform-iosiOS applications specificallyteam-iosOwned by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions