Hybrid application development
The VS code extension installation can be done in two different ways. Refer to VS code extension installation section for details.
Develop Hybrid application
The following sections explain how to use Visual Studio Code Extension for Tizen to develop your hybrid applications.
Create Tizen Native project
To create a Tizen Native project: Refer to Create Tizen Native project
Create Tizen Dotnet project
-
Open the Command Palette and select Tizen: Create Tizen project.
-
Select the project type as Dotnet.
-
Select the required profile for your application development.
-
Select the profile version for your application.
-
Select the required project template(eg:TizenNUIapp) for your application from template list.
-
Enter the project name.
-
If prompts for setting current project as working folder, select Yes or No.
Select Working Folder
-
Open the Command Palette and select Tizen: Set Tizen Working Folder.
-
Select the working folder of Tizen.
-
Selected working folder will be updated in workspace.yaml file.
Selected working folder will be considered as main app.
Update Dependency projects
-
From vscode File explorer Right click on main app and select Tizen:Update Dependency Projects.
-
Quick pick list with project list for selection will be displayed.
-
Select the dependency projects and press OK button.
-
Selected dependencies will be updated in workspace.yaml file
The Hybrid app is successfully created with selected working folder as main app, and selected dependency projects to main app as sub apps.
Build your project
-
Open the Command Palette and enter build. Select Tizen: Build Tizen project.
-
Review the build results in the output window, and check the location of the package file (.tpk).
Deploy and run your application in emulator
-
To launch the Tizen Emulator Manager, open the Command Palette and enter emulator. Select Tizen: Launch Tizen Emulator Manager.
-
Create and launch an emulator instance in the Emulator Manager.
-
To deploy your application to the target, enter install Tizen in the Command Palette and select Tizen: Install Tizen application.
-
To run the application on the emulator, enter run in the Command Palette and select Tizen: Run Tizen application.
Debug your application in emulator
-
Deploy and run your application in the emulator.
-
In the Visual Studio Code Activity Bar, select the Debug icon.
-
In the Debug view, open the Configuration drop-down menu and select Add Configuration or select Create a Launch.json file.
-
Select GDB for Tizen Native in the list of configurations.
-
Add a break point in your source code.
-
Start the debugging session by pressing F5.
To debug dotnet application, set dotnet app as main app, set native app as dependency app to dotnet app. Refer to Debug your application in emulator section for details.
Remove dependency projects
- Already added dependency projects (sub apps) can be removed from main app
-
From vscode File explorer Right click on main app and select Tizen:Update Dependency Projects.
-
Quick pick list with project list for select/deselect will be displayed.
-
DeSelect the dependency projects and press OK button.
-
removed dependencies will be updated in workspace.yaml file
Deselected projects will be removed from dependency project list from main app.
Import Tizen project
Import Tizen workspace folder
-
Open the Command Palette and select Tizen: Import Tizen project.
-
Select the required profile for your importing project.
-
Select the profile version for your importing project.
-
Select the import type as Workspace folder.
-
Select the workspace folder which needed to be imported.
-
On private rootstrap selection prompt, select NO if private rootstrap is not required.
-
Import settings will be applied in selected workspace folder and vscode reloads the selected workspace folder.
Import Tizen wgt file (Tizen Web application package file)
- Importing Tizen wgt file will import the wgt file to current workspace folder after deleting the current workspace contents.
To import wgt file to some other workspace:
Before importing wgt file, Select the workspace folder (empty folder) in which the wgt file is to be imported using open folder from File->Open Folder.
-
Open the Command Palette and select Tizen: Import Tizen project.
-
Select the required profile for your importing project.
-
Select the profile version for your importing project.
-
Select the import type as WGT.
-
Select the wgt file which needed to be imported to current workspace.
-
On private rootstrap selection prompt Select No if private rootstrap is not required.
-
Current workspace folder will be updated with imported wgt file.