Get Started on Tizen

Tizen is just one of the many target platforms for You.i React Native apps. Here’s how to get started with developing Tizen apps on Mac, Linux, or Windows.

Before You Start

You can build a You.i React Native app for Tizen on any of our supported development platforms: Linux, macOS, or Windows. Consult Environment Setup to verify that everything is set up properly.

Installing Dependencies (Linux and Windows)

Linux

Download and install the following packages:

sudo apt-get install libwebkitgtk-1.0.0
sudo apt-get install rpm2cpio
sudo apt-get install expect
sudo apt-get install bridge-utils
sudo apt-get install openvpn

Windows

Install Python 2.7.x by downloading the latest 2.7.x MSI installer for Windows and running the .msi file.

Install the Ninja Generator by downloading the latest Ninja generator binary file and saving the extracted folder to a known location, such as your C: drive.

Record the install paths; you’ll need them later when configuring environment variables.

Installing Java Development Kit and Tizen Studio

For all operating systems:

  1. Download the latest Java Development Kit (JDK) 8 for Mac, Linux, or Windows.
    1. Mac and Linux: Accept the license agreement, and select the Java SE development kit suitable for your operating system.
    2. Mac and Linux: Accept the license agreement, and select the Java SE development kit suitable for your operating system.
    3. Mac and Linux: Accept the license agreement, and select the Java SE development kit suitable for your operating system. For Mac, double-click the JDK’s .dmg file and follow the prompts. For Linux, follow the instructions to install JDK 8 here. For Linux, follow the instructions to install JDK 8 here. For Linux, follow the instructions to install JDK 8 here.
    4. Windows: Run the JDK’s .exe file and follow the prompts.
  2. Download and install Tizen Studio.
    1. Mac: Download Tizen Studio with the IDE installer, and run Tizen Studio’s .dmg file to start the installation. Record the SDK and workspace install paths; you’ll need them later when configuring environment variables.
      1. Linux: Download Tizen Studio with the IDE installer (.bin) for 64-bit. Alternatively, you can download the file using the following command on the terminal: wget http://download.tizen.org/sdk/Installmanager/tizen-sdk-X.x/tizen-sdk-ubuntu64-vX.x.x.bin Make sure you enter the correct version of Tizen Studio; where you see an X.x in the command above, replace it with the version of Tizen Studio that you are using. To make the .bin file executable: Open Terminal and navigate to the folder where Tizen Studio and the IDE installer were downloaded. Enter the following command to make the file executable: chmod +x <filename>.bin
      2. Execute the file using the following command: ./<filename>.bin
      3. Record the SDK and workspace install paths; you’ll need them later when configuring environment variables.
      4. Windows: Download Tizen Studio with the IDE installer, and run the installer. Record the SDK and workspace install paths; you’ll need them later when configuring environment variables.
  3. Mac and Windows: Ensure the Launch the Package Manager check box is selected in the Installation Complete dialog, and click Finish.

Installing SDK Tools and Extensions (Mac and Windows)

  1. In the Main SDK tab of the Tizen Studio Package Manager, find the row for Tizen SDK Tools, and click the Install button to the right. Image
  2. Click the Extension SDK tab. Open Extras, and click Install for Samsung Certificate Extension. Image
  3. Close the Package Manager when complete.

Installing Samsung NaCl SDK

Do the following steps:

  1. Download version 56 of the NaCl SDK Pepper Toolchain archive file.
  2. Create a new directory named nacl_sdk. For macOS or Linux, create the directory in your user or home directory, respectively.
  3. Extract the downloaded zip file to the new directory. The files appear in a sub-directory named pepper_56. Note: Record the path of the extracted file. It is used later to set an environment variable.
  4. In Tizen Studio, open the Preferences window.
  5. In the Preferences list, expand the Tizen Studio list. Select the NaCl option.
  6. Fill in the text field with the full NaCl Pepper SDK directory path, or click Browse and navigate to it manually. The paths look slightly different depending on the platform you’re working on. Image
  7. Click Apply and OK.

Configuring Environment Variables

To build Tizen application widget files from the command line, you must configure environment variables.

Mac and Linux

  1. Mac: Open your Bash profile using your favorite editor (this example uses nano):

    nano ~/.bash_profile

    Linux: Open the .bashrc file. Enter open ~/.bashrc

  2. Add the following environment variable for TIZEN_SDK_HOME:

    export TIZEN_SDK_HOME="$HOME/tizen-studio"
    
  3. Use the path recorded earlier when you extracted the NaCl Pepper SDK to set the TIZEN_NACL_SDK_HOME environment variable.

    export TIZEN_NACL_SDK_HOME="$HOME/nacl_sdk/pepper_56"
    
  4. Add the following to your PATH environment variable to allow the Tizen Command Line Interface (CLI) and Smart Development Bridge (SDB) tools to be available on the command line:

    export PATH=$PATH:$HOME/tizen-studio/tools:$HOME/tizen-studio/tools/ide/bin
    
  5. Update your current shell:

    Mac: source ~/.bash_profile

    Linux: source ~/.bashrc

Windows

  1. Add the following to the PATH environment variable if Visual Studio is not installed on any other directory path. Replace <version> in the command below with your version of Visual Studio: C:\Program Files\Microsoft Visual Studio <version>\VC\bin
  2. Add the following to the PATH environment variable if the Ninja generator is not installed on any other directory path: C:\Ninja-win
  3. Add the following to your PATH environment variable to allow the Tizen Command Line Interface (CLI) and Smart Development Bridge (SDB) tools to be available on the command line: C:\tizen-studio\tools;C:\tizen-studio\tools\ide\bin
  4. To build the You.i Engine SDK project for the Tizen platform, add the following environment variables:

    TIZEN_SDK_HOME=%HOMEDRIVE%\tizen-studio
    TIZEN_NACL_SDK_HOME=%HOMEDRIVE%\nacl_sdk\pepper_56
    PYTHONPATH=%HOMEDRIVE%\nacl_sdk\pepper_56\toolchain\win_pnacl\bin\pydir
    

Your First App

Once your dev environment is all set up, we recommend running through our Quick Start Guide. But if our Quick Start isn’t quick enough for you, here’s an even quicker start.

Install the You.i TV command line interface tool, You.i Platform, and any required dependencies youi-tv doctor requests.

yarn global add youi-cli
youi-tv login    # Enter your product key when prompted.
youi-tv install 6.13.0  # If asked, accept most recent version of Babel or other dependencies
youi-tv doctor   # Resolve any missing components (but don't worry about Android for now)

Set up scaffolding for your app with youi-tv init.

youi-tv init MyApp  # Create a folder called MyApp for your project
cd MyApp

Validate Your Config

Use youi-tv doctor to validate your configuration. Make any changes needed to meet the requirements.

Run Your App

If it’s not already running, start the Metro bundler (Yarn server) from your development platform.

yarn start  # can be from any folder in your project

Generate, build, deploy, and launch the Tizen project.

cd MyApp
youi-tv run -p tizen-nacl

For more information, see Building and Installing Tizen Application Widgets.

If You Had Issues

If you had any issues with this tutorial, you can download a zip file with the completed JavaScript and C++ files. The files contain updates for the entire tutorial and won’t run for all the steps, but they’re useful guides for adding lines of code.