Building Apps Locally with the Smartface CLI

You can generate Smartface iOS and Android binaries in your local environment. For the Android builds, you can use Linux or macOS. For iOS builds, macOS is required.

You can export native iOS and Android projects using the Smartface Command Line Tool(CLI) from your Smartface Cloud IDE workspace.

Before installing the Smartface Command Line Tool, please check the requirements on npm.

Installing the Smartface Command Line Tool

You can use the following shell commands to install the Smartface CLI. You can use either yarn or npm:

// install the latest stable Smartface cli version
yarn global add smartface
// install it with npm
npm i -g smartface
// install the latest beta Smartface cli version
yarn global add [email protected]
// install a specific Smartface cli version
yarn add global [email protected]
// check Smartface cli version
smfc -v

Generating platform-based native projects from the Smartface Cloud IDE

You can use the following shell commands to export your Smartface project as Xcode and Android Studio projects:

// Generate Android Studio Project
smfc --task=export:Android --projectRoot=$WORKSPACE_FOLDER --tempFolder=$TEMP_FOLDER
// Generate Xcode Project
smfc --task=export:iOS --projectRoot=$WORKSPACE_FOLDER --outputZip=$OUTPUT_ZIP_FILE

Requirements for iOS Builds

The build be run in a compatible Xcode version due to framework dependencies. Please check the xcodeversion file under the output folder to find out the Xcode version compatible with your project.

Requirements for Android Builds


Please make sure that the environment variables are set correctly:

javac -v

After the completion of the prerequisites and the installation of the Smartface CLI, you can generate APK files in your local environment or in your Smartface Cloud workspace.

// Generate Android Studio project
smfc --task=export:Android --projectRoot=$WORKSPACE_FOLDER --tempFolder=$TEMP_FOLDER
// Navigate to gradlew folder
cd $TEMP_FOLDER/SmartfacePlayer
// Build APK file
// module: app
// variant: playerProdRelease
./gradlew app:assemblePlayerProdRelease