Skip to content

[local_auth_darwin] Fix Swift 6 concurrency analyzer errors from lifecycle delegate methods - #13296

Merged
auto-submit[bot] merged 1 commit into
flutter:mainfrom
jmagman:la-swift
Oct 16, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:mainfrom
jmagman:la-swift

Conversation

@jmagman

@jmagman jmagman commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

FlutterApplicationLifeCycleDelegate / FlutterSceneLifeCycleDelegate protocol requirements are nonisolated, remove MainActor.

From #10836

Fixes flutter/flutter#194594

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2

// and applicationDidBecomeActive for apps that haven't migrated yet.
#if os(iOS)
@MainActor
public func sceneDidBecomeActive(_ scene: UIScene) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

@MainActor
public func applicationDidBecomeActive(_ application: UIApplication) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmagman jmagman added CICD Run CI/CD and removed CICD Run CI/CD labels Oct 16, 2026
@stuartmorgan

Copy link
Copy Markdown

In general, I would expect that getting plugins to compile cleanly in strict mode is going to be pretty messy until the engine is fixed to annotate its protocols. The engine contract has always been to call method on the main thread, and plugins assume (and often need) that, but the annotations aren't in place.

Doing it in the other order in all plugins will probably require a bunch of workarounds.

@jmagman
jmagman marked this pull request as ready for review October 16, 2026 21:27

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the local_auth_darwin package to version 2.0.5. It removes the @MainActor attribute from the sceneDidBecomeActive and applicationDidBecomeActive methods in LocalAuthPlugin.swift, and updates the CHANGELOG.md and pubspec.yaml files. There are no review comments, and I have no feedback to provide.

@jmagman

jmagman commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

In general, I would expect that getting plugins to compile cleanly in strict mode is going to be pretty messy until the engine is fixed to annotate its protocols. The engine contract has always been to call method on the main thread, and plugins assume (and often need) that, but the annotations aren't in place.

Doing it in the other order in all plugins will probably require a bunch of workarounds.

I'm sure there's a lot more to do here, I'm currently wack-a-moleing the errors from flutter/flutter#194594 so we can get that fixed asap.

There really weren't that many swift 6 errors though.

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2026
@auto-submit
auto-submit Bot merged commit f8262d2 into flutter:main Oct 16, 2026
13 checks passed
@jmagman
jmagman deleted the la-swift branch October 16, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: local_auth platform-ios platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

local_auth_darwin has main actor-isolated swift 6 errors

3 participants