Wednesday 3 June 2015

Titanium installation for Android apps development using CLI INTERFACE

Install the CLI
1.    Install the titanium CLI. On Mac OS X and Linux, you may need to prefix this command with sudo.
npm install -g titanium
2.    Log in using your Appcelerator credentials.
titanium login
You are prompted for your Appcelerator Platform login and password.
3.    Install the latest released SDK.
titanium sdk install
4.    Configure CLI.
titanium setup quick
The script prompts you to enter basic information, such as your name, Appcelerator Platform e-mail login, default locale, default SDK version, default workspace folder and Android SDK home directory.
Configure the CLI
Use the CLI setup wizard to quickly configure your CLI options and platform settings. For example, running the titanium setup command with no options prompts you to enter basic information as well as your Android SDK home directory for Android development. The following command prompts you for advanced CLI options and additional platform settings:
titanium setup
Use the CLI config command to selectively change your CLI options and platform settings. For example, running the titanium configcommand with no options outputs your current configuration settings. If you have already setup the Android SDK and NDK, the following commands set your Android platform settings (on a Mac OS X system):
titanium config android.sdk /Users/appc/sdk/android-sdk/
titanium config android.ndk /Users/appc/sdk/android-ndk-r8b/
Note: Not all platforms need to be configured. For example, for iOS development, the CLI uses the xcode-select path to obtain the path to the Xcode development tools.
Update the CLI
To update the CLI tool, run the npm install command. On Mac OS X and Linux, you may need to prefix this commands with sudo.
npm install -g titanium
To update the Titanium SDK, run the titanium sdk install command. For example, running the command with no options installs the latest released version. The following command installs the lastest continuous integration build and makes it the default SDK version:
titanium sdk install --branch master --default
Create a Basic Project
The following CLI commands create a basic project then builds it. You need to have a platform SDK installed and configured, or else you can only build Mobile Web projects. For the Android platform, you need to have previously created an Android virtual device (emulator). To create a new emulator, see Native Android Debugging and Testing Tools.
When running these commands, you are prompted for missing information, such as the application ID and platforms, which may also be specified using command-line options.
titanium create --name MyFirstProject
cd MyFirstProject
titanium build



No comments:

Post a Comment