Skip to content

Conversation

@okorohelijah
Copy link
Contributor

@okorohelijah okorohelijah commented Jan 20, 2026

Adds support for the new Apple UIScene lifecycle while maintaining backward compatibility with apps that haven't migrated yet.

Fixes flutter/flutter#174411

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 3

@okorohelijah okorohelijah changed the title Add UIScene lifecycle support [local_auth_darwin][UIScene] Add UIScene lifecycle support Jan 20, 2026
@okorohelijah okorohelijah marked this pull request as ready for review January 20, 2026 17:41
Copy link

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

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 adds support for the UIScene lifecycle to the local_auth_darwin plugin, ensuring compatibility with modern iOS apps while retaining support for older apps using the UIApplication lifecycle. This is achieved by adding a sceneDidBecomeActive delegate method and registering the plugin as a FlutterSceneLifeCycleDelegate. The changes also include updating the package version and SDK constraints. My review includes a suggestion to improve code maintainability by reducing duplication.

@LouiseHsu LouiseHsu requested a review from vashworth January 20, 2026 21:04
Copy link
Contributor

@vashworth vashworth left a comment

Choose a reason for hiding this comment

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

Comment on lines +49 to +52
#if os(iOS)
registrar.addApplicationDelegate(instance)
registrar.addSceneDelegate(instance)
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#if os(iOS)
registrar.addApplicationDelegate(instance)
registrar.addSceneDelegate(instance)
#endif
registrar.addApplicationDelegate(instance)
#if os(iOS)
registrar.addSceneDelegate(instance)
#endif

registrar.addApplicationDelegate(instance) is not iOS specific, it also applies to macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[local_auth_darwin][UIScene] Migrate to scene lifecycle

2 participants