Skip to content

iOS: Document and tidy the embedder API flag - #190828

Merged
cbracken merged 1 commit into
flutter:masterfrom
cbracken:embedder-api-flag
Aug 11, 2026
Merged

cbracken merged 1 commit into
flutter:masterfrom
cbracken:embedder-api-flag

Conversation

@cbracken

Copy link
Copy Markdown
Member

FLTEnableIOSEmbedderAPI is an existing (unused) switch for the iOS embedder API migration, but we didn't document its expected behaviour where we used it.

This documents its semantics in FlutterDartProject: it's opt-in while the migration is in progress, a YES value currently only has the effect of populating FlutterEngine's FlutterEngineProcTable. Once the embedder fully supports the embedder API and we've tested for a sufficient period, this will become opt-out and eventually be removed.

This also replaces the NSLog banner we emitted when the flag is on with FlutterLogger, so the message goes through the same logging path as the rest of the embedder and respects the configured log level.

Also drops two settings.enable_software_rendering = true assignments from testCanEnableDisableEmbedderAPIThroughInfoPlist. Those were the last references to that setting anywhere in the iOS embedder; nothing has read it on iOS since the software renderer fallback was removed in #190590.

Issue: #112232

Pre-launch Checklist

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

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

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.

@cbracken
cbracken requested a review from a team as a code owner August 10, 2026 06:16
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 10, 2026
@github-actions github-actions Bot added platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. team-ios Owned by iOS platform team labels Aug 10, 2026

@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 comment for the iOS embedder API flag in FlutterDartProject.mm, replaces an NSLog statement with a FlutterLogger call in FlutterEngine.mm, and removes software rendering settings from tests in FlutterEngineTest.mm. A review comment identifies a double-space typo in the newly added comment.

settings.resource_cache_max_bytes_threshold = screenWidth * screenHeight * 12 * 4;

// Whether to enable ios embedder api.
// Whether to run the iOS embedder on top of the embedder API rather than `Shell` directly.

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

There is a double space typo between API and rather in this comment.

@cbracken cbracken Aug 10, 2026 •

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.

Good bot but that doesn't mean I'm not annoyed. Done.

`FLTEnableIOSEmbedderAPI` is an existing (unused) switch for the iOS
embedder API migration, but we didn't document its expected behaviour
where we used it.

This documents its semantics in `FlutterDartProject`: it's opt-in while
the migration is in progress, a YES value currently only has the effect
of populating `FlutterEngine`'s `FlutterEngineProcTable`. Once the
embedder fully supports the embedder API and we've tested for a
sufficient period, this will become opt-out and eventually be removed.

This also replaces the `NSLog` banner we emitted when the flag is on
with `FlutterLogger`, so the message goes through the same logging path
as the rest of the embedder and respects the configured log level.

Also drops two `settings.enable_software_rendering = true` assignments
from `testCanEnableDisableEmbedderAPIThroughInfoPlist`. Those were the
last references to that setting anywhere in the iOS embedder; nothing
has read it on iOS since the software renderer fallback was removed in
flutter#190590.

Issue: flutter#112232
//
// See: https://github.com/flutter/flutter/issues/112232
NSNumber* enable_embedder_api =
[mainBundle objectForInfoDictionaryKey:@"FLTEnableIOSEmbedderAPI"];

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.

it's odd that this field is part of "FlutterDartProject.mm" - it shouldn't be related to dart at all. But since it's already there, feel free to leave it.

@cbracken
cbracken added this pull request to the merge queue Aug 10, 2026
Merged via the queue into flutter:master with commit 6116d7c Aug 11, 2026
16 of 17 checks passed
@cbracken
cbracken deleted the embedder-api-flag branch August 11, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants