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.
​
You can use the following shell commands to install the Smartface CLI:
// install the latest stable Smartface cli versionyarn global add smartface​// install the latest beta Smartface cli versionyarn global add smartface@beta​// install a specific Smartface cli versionyarn add global smartface@6.15.1​// check Smartface cli versionsmfc -v
​
You can use the following shell commands to select a player to be used in builds:
// select a specific ios player versionsmfc use 6.15.1-beta.1 --os iOS​// use the latest beta iOS playersmfc use beta --os iOS​// use the latest stable android playersmfc use latest --os Android​// use latest stable player for both platformssmfc use latest
​
You can use the following shell commands to export your Smartface project as Xcode and Android Studio projects:
// Generate Android Studio Projectsmfc --task=export:Android --projectRoot=$WORKSPACE_FOLDER --tempFolder=$TEMP_FOLDER​// Generate Xcode Projectsmfc --task=export:iOS --projectRoot=$WORKSPACE_FOLDER --outputZip=$OUTPUT_ZIP_FILE
​
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.
​
Prerequisites:
install JDK 1.7 or later and set JAVA_HOME
install android sdk (go to command line tools only section) and then set ANDROID_HOME
​android-ndk-r16b and then set ANDROID_NDK_HOME
install make​
Please make sure that the environment variables are set correctly:
javac -vecho $ANDROID_HOMEecho $ANDROID_NDK_HOME
​
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 projectsmfc --task=export:Android --projectRoot=$WORKSPACE_FOLDER --tempFolder=$TEMP_FOLDER​// Navigate to gradlew foldercd $TEMP_FOLDER/SmartfacePlayer​// Build APK file// module: app// variant: playerProdRelease./gradlew app:assemblePlayerProdRelease
​