Appcelerator Titanium build tools and UI for the Atom text editor.
- Atom 1.21 (or later) is required.
- Some features are implemented as providers for services in the Atom IDE package. Install
Using the Atom package manager
Preferences/Settings > Install > Search for
Using the CLI:
apm install appcelerator-titanium
Open a Titanium project
File > Open... > Browse to Titanium project
From the CLI:
||Build using the current selected command and configuration|
|appc:stop||None||Stop the current build|
|appc:console||None||Toggle the console|
|appc:generate||None||Open dialog to generate a new alloy file or component|
|appc:take-screenshot||None||Take a screenshot of the currently running device|
||Open the related Alloy XML file|
||Open the related Alloy TSS file|
|appc:open close related||
||Clean the current project directory|
The toolbar provides a UI to commonly used commands when developing a Titanium application. Further information on each function is provided in the sections below.
1. Build select and run
Select to run on simulator or device, package for ad-hoc or App Store distribution or a custom build option.
2. Platform select
Select available platforms to build for.
3. Target select
Select simulator/emulator or local device. When attaching a device, select Refresh Targets option to add it to the target list.
4. Code signing / Android KeyStore configuration
When building for device (iOS) or distribution (iOS and Android) the option to configure code signing or keystore credentials is available.
5. LiveView toggle
Toggle the LiveView icon to enable or disable LiveView in your application.
6. Info panel
Provides information about the active project.
7. Generate component
Presents a dialog to generate a Titanium component: Controller, View, Style, Model, Widget or Alloy.jmk file.
Show or hide the console which outputs debug information during build and run.
The build select button executes and provides selections of the build command. Depending on the target platform selected, the drop-down will display options for the
appc run command:
- Run: Build and run the app on selected simulator/emulator or device
- Ad-Hoc: (iOS only) build and package the app for Ad-Hoc distribution using selected code signing
- Publish: Build and package the app for distribution through the App Store or Google Play using selected code signing or keystore credentials
- Custom: Execute
appc run -d <project_dir>with custom arguments
The console displays debug logging during the build and run. The log level is passed to the
appc run comand so selecting the log level does not alter output from the currently executing command. There are options to automatically scroll the console to the latest message and to open it when a build is initiated.
By default the executing command is displayed in the console to aid debugging. This can be disabled in the package settings.
iOS code signing
When building for a device and ad-hoc or App Store distribution, a certificate and provisioning profile must be selected. Click the code signing / keystore button (#4) to display the code signing options.
Certificates are populated according to the selected build option (developer / distribution). Available provisioning profiles are displayed but only those which match the selected certificate and app ID are enabled.
When building for distribution through Google Play, the app must be signed with a keystore. Click the code signing / keystore button (#4) to display the keystore options.
The path to the keystore can be entered manually or by using the file picker. Keystore path and alias are stored in package configuration.
Autocompletion support is provided to help speed up development by providing quick references to Titanium APIs and Alloy markup as well as references to modules, widgets and assets within your project.
On initial launch, autocomplete suggestions are generated for the current selected Titanium SDK. You can check and set this using the CLI:
$ appc ti sdk ... Installed SDKs: 7.2.0.GA [selected] 7.2.0.GA
$ appc ti sdk select
Autocomplete suggestions can be regenerated by selecting the 'Regenerate autocomplete suggestions' option from the package settings and relaunching Atom.
Titanium and Alloy
Suggestions for other controllers, modules and widgets are presented when referencing through a Titanium function or Alloy markup.
Class and ID references
Suggestions for classes and IDs declared or defined in related Alloy XML and TSS files are presented.
Image suggestions are presented where appropriate, including a thumbnail preview and information about the scaled versions available.
Alloy file and component generation
A UI for the
alloy generate command is provided. The Generate File dialog is presented by clicking the + icon in the toolbar or using the command from the menu or palette. Select the type of file or component to generate and provide the required information. The generated file(s) are then opened.
Open related files
Opening related Alloy files is supported (see above commands list).
- From View, open related Style and/or Controller
- From Style, open related View and/or Controller
- From Controller, open related View and/or Style
Jump-to-definition support is provided for quickly accessing the definiion or usage of Alloy markup and to easily generate new definitions. Images can be opened directly from their path.
From Views, click through to style definitions for tags, classes and IDs, in related or global TSS. Click through to event definitions in the related controller.
A prompt is displayed to generate undefined styles or functions.
Click on localised string references to jump to their definition. The option to generate undefined strings is provided.
Click on an image path to open the image in a new tab. For iOS, where multiple scaled images exist with the same name the first is opened (e.g. @2x).
Code snippets for common Alloy and Titanium APIs are provided for use in Alloy controllers and modules. A description of the snippet and link to documentation are provided where appropriate. Type the prefix and the autocomplete overlay will be displayed with matching snippets.
||Debug log message|
||Error log message|
||Info log message|
||Warn log message|
||Trace log message|
||Add event listener|
||Remove event listener|
||Show alert dialog|
||Show option dialog|
||Play local or remote audio|
||Play local or remove video|
||Alloy Globals object|
||Alloy CFG object|
||Alloy create controller function|
||Alloy create collection function|
||Alloy create model function|
||Alloy create widget function|
||iOS conditional statement|
||Android conditional statement|
||Windows conditional statement|
This package would not be possible without support from the Titanium community. Autocompletion, jump-to-definition and grammar support provided by Jong Eun Lee through the Titanium Alloy package. Also a huge thanks to all our open source contributors that help making every release unique for the Titanium community!
We doff our caps to: