# Titanium

The top-level Titanium module.

Availability
0.8
0.8
9.2.0
4.1.0

# Overview

The Titanium module provides the Titanium Mobile API, allowing developers to access native features of each target environment. Currently, the Android and iOSenvironments are supported.

# Titanium Namespace

The complete Titanium API is accessible from the Titanium namespace but, for convenience and brevity, the alias Ti is also provided. As the Titanium namespace is functionally-identical to its Ti alias, it is always recommended to use Ti in your code.

For example, the following pairs of Titanium calls behave exactly the same.

Titanium.API.info('Hello Titanium!');
Ti.API.info('Hello Titanium!');

Titanium.Utils.sha256('Hello Titanium!');
Ti.Utils.sha256('Hello Titanium!');

Titanium.App.Properties.setString('hello_msg','Hello Titanium!');
Ti.App.Properties.setString('hello_msg','Hello Titanium!');

Titanium.Database.open('mydb');
Ti.Database.open('mydb');

# Global APIs

Titanium includes a number of built-in JavaScript objects that are not part of the Titanium namespace, including String formatting, timers, and the CommonJS require function. See Global for details.

# Properties

# buildDate READONLY

Availability
0.8
0.8
9.2.0
4.1.0
buildDate :String

Date of the Titanium build.


# buildHash READONLY

Availability
0.8
0.8
9.2.0
4.1.0
buildHash :String

Git hash of the Titanium build.


# userAgent

Availability
0.8
0.8
9.2.0
4.1.0
userAgent :String

User-agent string used by Titanium.


# version READONLY

Availability
0.8
0.8
9.2.0
4.1.0
version :String

Version of Titanium that is executing.

# Methods

# createBuffer

Availability
0.8
0.8
9.2.0
4.1.0
createBuffer(params) Titanium.Buffer

Creates a new buffer based on the params.

Parameters

Name Type Description
params CreateBufferArgs

creation arguments

Returns

The new buffer.