# Target iOS and Android

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/platforms/mobile/

Share view models and controls, then supply a mobile entry point and a single-view lifetime. Desktop `Window` behavior is not the hosting contract for mobile content.


## Start with an existing host

Use the [iOS catalog](https://github.com/wieslawsoltes/FerroUI/tree/d503df2befa756e681fcdc6250e9552dc7388bea/samples/ControlCatalog.iOS) or [Android catalog](https://github.com/wieslawsoltes/FerroUI/tree/d503df2befa756e681fcdc6250e9552dc7388bea/samples/ControlCatalog.Android) before adapting your own application. These supply the platform entry points and build setup that a shared view does not include.

From the repository root, the supplied smoke scripts can build and exercise the hosts:

```sh
# Replace the simulator argument with an installed device name or UDID.
scripts/ios/sim-catalog.sh 'YOUR_SIMULATOR_UDID' --pages Home,TextBox,ListBox
# Uses the configured Android SDK, NDK, and emulator.
scripts/android/emu-catalog.sh --build --pages 'Home;TextBox;ListBox'
```

These scripts manage a simulator/emulator run and capture the requested pages. Follow their `--help` output for keeping the device running and selecting output paths. Device signing and store distribution remain separate steps.

For a shared profile view, keep the form in a component or a `UserControl`; each platform host installs that view using its own lifetime. A component is shown there through `ComponentHost::with_view(|| rsx! { ProfileForm {} })`, a control the single-view lifetime can hold. Put saved profile data in a service so a recreated surface can rebuild the form from state.

## iOS

Use Xcode, the iOS SDK, and a Rust target appropriate to the simulator or device. The repository includes bundling scripts and a catalog entry point. Simulator success does not verify signing, device GPU behavior, safe areas, or VoiceOver on physical hardware.

## Android

Use the Android SDK and NDK with the framework's supported minimum API level. The repository's packaging scripts build without requiring a Gradle application project. Keep the native activity lifecycle, input method, and surface lifecycle in mind when retaining application state.

## Design for interruption

A mobile app can lose focus, pause, change orientation, or have its surface recreated. Persist important state in services or models with an appropriate lifetime. Cancel transient work and avoid assuming every control attachment lasts for the whole process.

## Verify interaction

Test touch target size, software keyboard occlusion, scrolling while text is focused, safe-area insets, back navigation, accessibility, and suspend/resume. Use actual devices for release confidence; emulators and simulators cover only part of the platform behavior.

## Public controls and next steps

- [UserControl](/docs/0.5.0/controls/reference/usercontrol/) — reusable content without desktop window assumptions.
- [ScrollViewer](/docs/0.5.0/controls/reference/scrollviewer/), [TextBox](/docs/0.5.0/controls/reference/textbox/), and [Button](/docs/0.5.0/controls/reference/button/) — a form that remains usable with the software keyboard open.
- [Adaptive layout](/docs/0.5.0/design/layout/), [accessibility](/docs/0.5.0/design/accessibility/), and [async lifetimes](/docs/0.5.0/guides/async/).
- [Public API index](/docs/0.5.0/api/) — check each entry's extracted platform availability before using a platform-specific method.
