Skip to content

[ios]add a note on plugin's init being deferred - #13644

Open
hellohuanlin wants to merge 3 commits into
flutter:mainfrom
hellohuanlin:uiscene_note_on_plugins_init_deferred
Open

[ios]add a note on plugin's init being deferred#13644
hellohuanlin wants to merge 3 commits into
flutter:mainfrom
hellohuanlin:uiscene_note_on_plugins_init_deferred

Conversation

@hellohuanlin

Copy link
Copy Markdown
Contributor

Description of what this PR is changing or adding, and why:

Add a note on plugin's init method being deferred as well.

Issues fixed by this PR (if any):

NA

PRs or commits this PR depends on (if any):

NA

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@hellohuanlin
hellohuanlin requested review from a team and sfshaza2 as code owners July 29, 2026 21:36

@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 documentation for UISceneDelegate breaking changes to note that plugins' init methods are deferred until scene connection. The review feedback suggests formatting the added sentence to start on a new line to adhere to semantic line break guidelines.

Comment on lines +896 to +897
`scene:willConnectToSession:options:` callback. Plugins'
`init` methods are also deferred until scene connection.

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.

medium

According to the style guide for Dart and Flutter websites, each sentence should start on a new line to adhere to semantic line breaks. Please move the new sentence starting with "Plugins'" to its own line.

Suggested change
`scene:willConnectToSession:options:` callback. Plugins'
`init` methods are also deferred until scene connection.
`scene:willConnectToSession:options:` callback.
Plugins' `init` methods are also deferred until scene connection.

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.

I don't think that's technically true. It's deferred to once the ViewController is added to the view hierarchy I believe, which happens before scene connection I thought

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

IIRC it's happening in awakeFromNib, which is when VC is loaded from the xib file, but not necessarily been added to the view hierarchy. I rephrased it a bit.

@flutter-website-bot

flutter-website-bot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit c09b049):

https://flutter-docs-prod--docs-pr13644-uiscene-note-on-plugin-emtcs8gy.web.app

@hellohuanlin
hellohuanlin requested a review from vashworth July 29, 2026 21:49
@flutter-website-bot

flutter-website-bot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated flutter.dev site (updated for commit c09b049):

https://flutter-dev-230821--www-pr13644-uiscene-note-on-plugin-vcr679su.web.app

Comment on lines +896 to +897
`scene:willConnectToSession:options:` callback. Plugin registration
methods are also deferred until the `FlutterViewController` is loaded.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand a lot of this doc, but is the point of this addition that plugin registration methods are now also called too late to set up the relevant APIs?

If so, can we focus on that and drop the FlutterViewController mention? Something like:

Your plugin's registration method is also
called too late to configure these APIs in.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants