Alloy MVC Framework for Titanium SDK

3.0.0 · active · verified Sun Apr 19

Alloy is an MVC (Model-View-Controller) application framework specifically designed for building cross-platform native mobile applications with the TiDev Titanium SDK. It provides a structured approach to developing Titanium apps by separating concerns into XML-based views, JavaScript controllers, and data models/collections (leveraging Backbone.js internally). The current stable version is 3.0.0, released in 2026. While not on a strict calendar-based release cadence, it receives active maintenance with several minor and major releases per year, as seen with versions 2.0.0, 2.1.0, and 3.0.0 released in 2024-2026. Its key differentiator is its tight integration with the Titanium SDK, offering a declarative UI (XML) and convention-over-configuration for mobile app development on iOS and Android platforms.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize a new Titanium mobile application, convert it to an Alloy project using the `alloy new` command with a sample template, and then build it for a target platform.

/* 
  This quickstart demonstrates how to set up a new Titanium Alloy project 
  using the Alloy CLI tool and a sample application template. 
  This is executed from your system's terminal, not a JavaScript file.
*/

# 1. Install Titanium CLI and Alloy globally (if not already installed)
npm install -g titanium alloy

# 2. Create a new Titanium Classic project as a base
titanium create \
  --name MyAlloyApp \
  --id com.example.myalloyapp \
  --platform ios,android \
  --sdk latest \
  --type classic

# 3. Navigate into the newly created project directory
cd MyAlloyApp

# 4. Convert the Classic project to an Alloy project using a sample template
alloy new . --testapp basics/simple

# 5. Build and run the application (e.g., for iOS simulator)
titanium build --platform ios --target simulator --device-id iPhone

/* 
  The 'alloy new . --testapp basics/simple' command will populate your project
  with the files from the 'basics/simple' Alloy sample, providing a runnable 
  Alloy application structure ready for development.
*/

view raw JSON →