Preview an Android or iPhone app on your computer
Run a native Android or iOS project in an emulator or simulator on your computer, and view or control it from Amble. Experimental.
On this page
What native app preview does
Native app preview builds a native project on your computer, starts an Android emulator or an iPhone simulator there, and shows it in Amble so you can look at it and use it. The emulator or simulator runs on the computer that holds the project, not on your phone.
It is an experimental add-on to app previews. Ordinary web previews work the same way as before.
-
A project with an
androidfolder (Gradle) or aniosfolder (Xcode project or workspace). Expo projects can be prepared from Amble. - For Android: the Android SDK pieces, Java and an emulator image on the computer. Amble shows what is missing.
- For Apple targets: a Mac with Xcode set up and an iPhone Simulator available. Other computers report that Apple preview is not available.
- An Amble host that reports native preview support. If not, the panel asks you to update that computer.
Native preview is marked experimental. A found toolchain does not prove your project will build with it, so check each step rather than assuming it will run.
Start a native preview
-
Open the preview for the workspace
Open the workspace on the computer that has the project, then open its app preview. If the project has native targets, they are listed in the native preview panel. A connected host that has not yet reported setup shows what it still needs.
-
Fix any setup it lists
The readiness list names missing tools such as the Android command-line tools or Java. Some steps ask you to review and accept a vendor license, for example Review Android command-line tools license. Amble does not accept a vendor license for you. After a fix, choose Check targets and setup again.
-
Choose a target and an update mode
Pick a device in Native preview target (the field reads Choose a simulator until you do). Where the host supports it, Native preview updates lets you choose Live updates or Bundled build.
-
Build and open the app
Choose Build and open the selected native app. Amble builds with the project’s own wrapper, launches the app in the emulator or simulator and streams it back to you.
The emulator or simulator picture appears in Amble and responds when you click or tap it.
Use it, then stop it
Interact with the streamed device as you would with a web preview. For a Flutter project, Hot reload and Hot restart appear once the app is running.
The app stops itself after it is idle. A countdown appears before that happens, and you can extend the deadline or keep the app running. Stop native app ends it at any time, and Cancel native preview stops a start that is still in progress.
Apple Watch and Wear OS previews are separate, experimental options that the host turns on explicitly. They are view-only, so touch and Digital Crown controls are not available.
What it does not do
- It does not preview on a real phone or tablet. Physical devices do not count as ready.
- It does not make an iPhone simulator run on Windows or Linux.
- It does not run your project’s scripts while looking for targets. Discovery only reads project files.
- Viewing a stream from another network goes through the relay, which needs a plan that includes remote live preview. On the same network or on the computer itself, that plan limit does not apply. See Amble Cloud.
If it does not work
- No native targets are listed
-
Check that the project has an
android/settings.gradle(or.kts) or aniosXcode project. Amble looks at the project root and nested folders and ignores linked directories. - The panel says to update the computer
- That host does not report native preview yet. Update Amble on it, then reconnect.
- Apple targets are unavailable
- They need macOS, Xcode with first-launch setup finished, and an available iPhone Simulator.
- The build fails
- Open the build details in the panel, or run the project’s own build in a terminal on that computer, to see the compiler’s message.