Preview and Export

Android setup

To be able to preview or export to Android, you need to install the required SDK components. Pull up your terminal and run the following:

fuse install android

This will attempt to locate existing Android SDK components, and install them if necessary.

If you are running Windows you also need to install the right USB driver for your device. A list of drivers for common vendors, as well as instructions to install them can be found here.

Also on your android device itself you will need to enable 'developer options' & 'usb debuging'. For info on how to do this please see the official docs here.

iOS setup

You will need Mac OS X and Xcode to preview and export your app to iOS.

You also need to create a free Apple Developer account and register it under Xcode's settings as shown below.

Preview

We can easily preview apps both locally and on Android/iOS devices while you get immediate feedback on the changes you make to the UX markup and JavaScript.

Preview from Fuse Dashboard

In the dashboard, navigate to your project and click the "Start app preview" button. A modal window will appear, in which you select the target platform to start preview on.

Preview from Sublime Text

To preview from sublime text, right-click any ux or unoproj file in the sidebar and select your target platform under the Fuse: Preview menu.

We can also start preview from the command palette. Press Cmd+Shift+P (OS X) or Ctrl+Shift+P (Windows) to bring up the palette, and type Fuse Preview to see a list of preview targets.

Preview from Atom

Press Cmd+Shift+P (OS X) or Ctrl+Shift+P (Windows) to bring up the command palette, and type Fuse Preview to see a list of preview targets.

Preview from command line

In your terminal, cd to the your project's directory, and run the command that corresponds to your build target.

fuse preview -t=Android
fuse preview -t=iOS
fuse preview -t=Local   # The -t=Local flag is optional in this case

We can get further documentation on fuse preview by running fuse help preview.

Export

When exporting your app, your UX markup is compiled to native C++ code, meaning that you lose the ability to preview your app in real time. However your app will function on its own, without a network connection back to your computer. This is what you want when distributing your app.

Android

In the project root, run the following command in your shell:

fuse build --target=Android --run

This will deploy and start the project on your connected Android device.

To make a release build, run:

fuse build --target=Android --configuration=Release

Note: to export your app to the Google Play Store, you need to sign it first.

iOS

In the project root, run the following command in your shell:

fuse build --target=iOS --run

If you instead want to open the generated project in Xcode, run fuse build --target=iOS -adebug

To make a release build, run:

fuse build --target=iOS --configuration=Release

Note: to export your app to the App Store, you need to sign it first.

Signing

See the signing article for a guide on signing your app for release.