Introduction
Titanium is an open-source SDK for building native mobile apps in JavaScript. You write one codebase; Titanium runs it against the real native platform APIs, so the buttons, lists and navigation your app creates are the platform's own, not a web view imitating them.
How it works
Your JavaScript runs in a JavaScript engine on the device: V8 on Android,
JavaScriptCore on iOS. Calls like Ti.UI.createButton() create an actual
android.widget.Button or UIButton and hand you a reference to it. There is
no bridge to a browser and no DOM, which is why a Titanium list scrolls like a
native list.
That has two consequences worth knowing up front. Platform differences reach your code rather than being hidden, because you are using the platform's own widgets. And anything the SDK does not wrap can be reached with a native module, written in Kotlin, Java, Swift or Objective-C.
Beyond the core API you get Alloy, an optional MVC framework with XML views, TSS styling and data binding, and a command-line interface that creates, builds, runs and packages projects.
Start here
- Set up your environment installs the toolchain for your operating system. Budget an hour on a clean machine.
- Your first app creates a project, runs it on a simulator, and installs it on a real phone.
- Project structure explains what the
generated project contains and what
tiapp.xmlconfigures.
The API reference documents every type, method, property and event in the SDK, for every released version. It is complete and searchable today.
About these guides
The guides are being rewritten. The structure is settled, and pages are landing section by section. Anything not yet written is marked as such rather than hidden, so you can see what is coming and what is already here.
Until a guide exists, the API reference is the authoritative source, and the Titanium SDK repository is where the behaviour is defined.
Titanium is maintained by TiDev, a non-profit, and built by the people who use it. Contribute if you want to help.
- Getting StartedGet a machine ready to build, on your operating system.
- Building AppsEverything between a new project and a working app.
- AlloyThe MVC framework: XML views, styles, models, and data binding.
- Distributing AppsFrom a working build to a store listing.
- ReferenceLook-up material: the Titanium API, the CLI, tiapp.xml, and compatibility.
- Extending TitaniumWriting the pieces rather than using them.