Skip to content

ios: let the host install an app-provided asset source - #17

Closed
Hmbown wants to merge 1 commit into
longbridge:mainfrom
codewhale-hq:feat/ios-app-asset-source
Closed

Hmbown wants to merge 1 commit into
longbridge:mainfrom
codewhale-hq:feat/ios-app-asset-source

Conversation

@Hmbown

@Hmbown Hmbown commented Sep 17, 2026

Copy link
Copy Markdown

run_app constructs the Application with the unit asset source, so any consumer that ships its own assets (kit Icons, for example) paints blank slots — and there is no post-run setter, because the runner owns Application construction.

This adds a seam: set_app_assets(Arc<dyn gpui::AssetSource>) registers a source before run_app, and the runner installs it via with_assets. It keeps the runner decoupled from any particular bundle — the app passes its own include_bytes! bundle from its registration callback.

We use this in an iOS app host; without it every kit icon is blank. Android does not need it (the app owns android_main and chains with_assets itself), so this is the iOS-side twin.

run_app builds the Application with the unit asset source, so every kit Icon paints a blank slot, and there is no post-run setter. set_app_assets registers an Arc<dyn gpui::AssetSource> before run_app and the runner installs it via with_assets, keeping the runner decoupled from any bundle the app might choose.
Copilot AI lite review requested due to automatic review settings September 17, 2026 11:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Hmbown Hmbown closed this Sep 17, 2026
@Hmbown
Hmbown deleted the feat/ios-app-asset-source branch September 17, 2026 11:54
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