Skip to content

Fix flet build ignoring [tool.flet.deep_linking] on Android and iOS - #6953

Open
FeodorFitsner wants to merge 1 commit into
flet-1.1.0from
fix/deep-linking-fallback
Open

FeodorFitsner wants to merge 1 commit into
flet-1.1.0from
fix/deep-linking-fallback

Conversation

@FeodorFitsner

@FeodorFitsner FeodorFitsner commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #6951.

Problem

On Android and iOS flet build read only [tool.flet.<platform>.deep_linking], so a project that configured deep linking once in [tool.flet.deep_linking] got no deep-link entries in the manifest / Info.plist — the common table was only read on desktop and web, where it does nothing.

Fix

New BaseBuildCommand.get_deep_linking_setting(key): on Android and iOS the platform table wins and the common table is the fallback, per key (so a platform table may override just host); other platforms read only the common table, as before. --deep-linking-scheme/--deep-linking-host still override both when given together, and both scheme and host are still required. This is the precedence website/docs/publish/index.md already documents, so no docs change.

Tests

tests/test_build_platform_settings.py: common table as fallback on Android/iOS/desktop/web, platform table overriding per key, platform-only config, and the iOS table not leaking to Android. cd sdk/python && uv run --no-dev --group test pytest packages/flet-cli/tests → 473 passed, 1 skipped.

Summary by Sourcery

Apply the documented deep-linking configuration precedence consistently across Android, iOS, desktop, and web builds.

Bug Fixes:

  • Fix flet build deep-link configuration on Android and iOS by using the common [tool.flet.deep_linking] settings as per-key fallbacks when platform-specific values are absent.

Tests:

  • Add coverage for common, platform-specific, per-key precedence, platform-only, and cross-platform isolation of deep-link settings.

…6951)

On Android and iOS flet build read only the platform's deep_linking
table, so a project that configured deep linking once in
[tool.flet.deep_linking] got no deep-link entries at all. Resolve each
key from [tool.flet.<platform>.deep_linking] first, then the common
table, as the publish docs describe; other platforms keep reading only
the common table.

Closes #6951

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@FeodorFitsner
FeodorFitsner requested a balanced review from Copilot October 10, 2026 21:08
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying flet-website-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 536c04d
Status: ✅  Deploy successful!
Preview URL: https://525bba0d.flet-website-v2.pages.dev
Branch Preview URL: https://fix-deep-linking-fallback.flet-website-v2.pages.dev

View logs

Copilot AI 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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open findings
What changed in this PR

Fixes flet build deep-linking config precedence on Android and iOS so the common [tool.flet.deep_linking] table becomes a per-key fallback when platform-specific values are missing, matching documented behavior.

Changes:

  • Add BaseBuildCommand.get_deep_linking_setting(key) to resolve deep-link settings with correct per-platform precedence.
  • Update build logic to use the new resolver for scheme and host.
  • Add tests covering common fallback, per-key overrides, platform-only config, and cross-platform isolation.
File Description
sdk/​python/​packages/​flet-cli/​src/​flet_cli/​commands/​build_base.py Introduces get_deep_linking_setting() and uses it to resolve deep-link scheme/host.
sdk/​python/​packages/​flet-cli/​tests/​test_build_platform_settings.py Adds test coverage for precedence rules and isolation across platforms.
CHANGELOG.md Documents the bug fix for Android/iOS deep-linking precedence.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

else self.get_platform_setting(pyproj_setting, default_value)
)

def get_deep_linking_setting(self, key: str):
Comment on lines +2961 to +2968

assert self.get_pyproject
platform = {"Android": "android", "iOS": "ios"}.get(self.package_platform)
if platform:
value = self.get_pyproject(f"tool.flet.{platform}.deep_linking.{key}")
if value is not None:
return value
return self.get_pyproject(f"tool.flet.deep_linking.{key}")


@pytest.mark.parametrize("package_platform", ["Android", "iOS", "Darwin", "Emscripten"])
def test_common_deep_linking_is_the_fallback(package_platform):
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.

2 participants