Welcome to the Titanium SDK open source project. Titanium SDK provides a mature platform for developers to build completely native cross-platform mobile applications using JavaScript.
Currently supported native platforms are iOS and Android.
Titanium SDK is licensed under the OSI approved Apache Public License (version 2). Please see the LICENSE file for specific details.
- Table of Contents
This project wouldn't be possible without the help of our world wide developer community. Become a sponsor today and benefit from 1:1 sessions with the core team, exclusive modules, merchandise and more!
Learn more about sponsoring TiDev, the organization behind the Titanium SDK, here π.
With Titanium SDK, you use JavaScript to code your application. Titanium's compiler will compile your application code into an efficient native executable for each target mobile platform.
- Native apps built using JavaScript (no hybrid, no embedded WebView)
- Apps are compiled and run locally with full offline support
- Support for native platform UI controls (TabGroup (iOS), ActionBar (Android), AppBar (Windows), ...)
- Support for watchOS targets
- Support for in-application SQL database
- Support for Geolocation (compass, geolocation, forward/reverse lookup)
- Support for Camera (taking Photos, playing and recording Video)
- Support for Calendar (creating & fetching Events)
- Support for 3D-Touch (Peek and Pop, Application Shortcuts, ...)
- Support for Photo Album (reading and writing)
- Support for Contacts Database / Address Book
- Support for Streaming Audio and Recording Audio, Audio Input Levels, Mic etc
- Support for Vibration
- Support for Social APIs such as Facebook, Twitter, etc.
- Support for Yahoo YQL
- Support for Web Services via REST, SOAP
- Support for native Maps
- Support for Push Notifications
- Support for In-Application Email
- Support for In-Application SMS, Telephone
- Support for Filesystem (create, read, write, etc.)
- Support for Gestures (such as Shake and Pinch)
- Support for Platform and Device capabilities
- Support for complex native views such as Coverflow, Image Views, Table Views, Grouped Views, Composites, etc.
- Support for Web Views incorporating HTML5, CSS etc.
- Completely extensible via Module API and Hyperloop for building your own controls or extending capabilities
And much, much more (see our Documentation for more infos).
Use Hyperloop, our latest addition to the Appcelerator Platform, to extend your Titanium SDK apps by native API's using JavaScript. Prior to Hyperloop, you would use native modules to extend the Titanium SDK API. With Hyperloop, you are now able to implement native classes, 3rd-Party libraries (Cocoapods, local frameworks, .aar files) and more directly into your apps. Hyperloop is available for iOS, Android and Windows Phone (Tech Preview).
Build and maintain apps in a fraction of the time with up to 95% code reuse.
Access 100% of platform APIs directly, with instant support for each new OS release.
Create mobile apps using the worldβs most popular programming language.
Incorporate 3rd-party native libraries using JavaScript, with no changes required.
Easily create complex custom effects like dynamic animations using JavaScript.
Mobile app development for every major mobile OS β with no hybrid compromises.
Create a native view in iOS and Android:
// iOS
var view = new UIView();
// Android
var view = new View(activity);
Check out our Hyperloop Sample App and Hyperloop Programming Guide to get started with Hyperloop today!
Alloy is the MVC application framework built on top of Titanium SDK. It is optional. It rocks. Check it out if you're considering using Titanium SDK. It is also a separate open source project available under Apache Public License.
Manage your application scope by separating your code into different models, views, controllers and more:
index.xml (View)
<Alloy>
<Window title="Titanium SDK and Alloy">
<Button onClick="handleClick" id="myButton">Click me!</Button>
</Window>
</Alloy>
index.js (Controller)
function handleClick() {
alert('Hello from the Controller!');
}
index.tss (Style)
Window: {
backgroundColor: 'white'
}
"#myButton": {
width: 200,
height: 30,
backgroundColor: 'green'
}
There are a number of ways to get help with Titanium SDK.
Please visit the official documentation site at https://titaniumsdk.com/ for the latest and historical documentation on Titanium SDK, Alloy and other modules.
Community support and discussion about Titanium SDK is available on Slack at TiSlack or at GitHub Discussions.
Please consider following @Titanium SDK and @TiDev on Twitter for updates.
We give our software away for FREE! In order to do that, we have programs for companies that require additional level of assistance through training or commercial support, need special licensing or want additional levels of capabilities. Please visit the TiDev Website for more information about TiDev or email [email protected].
Titanium SDK is an open source project. Titanium SDK wouldn't be where it is now without contributions by the community. Please consider forking Titanium SDK to improve, enhance or fix issues. If you feel like the community will benefit from your fork, please open a pull request.
To protect the interests of the Titanium SDK contributors, Appcelerator, customers and end users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is simple and straightforward - it requires that the contributions you make to any Appcelerator open source project are properly licensed and that you have the legal authority to make those changes. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes only a few minutes, and only needs to be completed once.
You can digitally sign the CLA online. Please indicate your email address in your first pull request so that we can make sure that will locate your CLA. Once you've submitted it, you no longer need to send one for subsequent submissions.
If you'd like to build the SDK locally you can use the included npm scripts:
npm ci
npm run cleanbuild
The build and package commands will default to all target platforms on your host OS unless explicitly specified. (i.e. Android, iOS on macOS; Windows and Android on Windows). It will compile, package and install the locally-built SDK for you as well, so you can test it in your own applications without any further procedures.
The build command will look for the Android SDK directory path via the $ANDROID_SDK env variables if not explicitly passed using command line arguments.
You can use the -h
flag to display the full list of comands and options.
npm ci
npm run cleanbuild -- [platform1] [platform2] --android-sdk /opt/android-sdk /Users/build/android-sdk-macosx
We have a unit test suite intended to run across all supported platforms.
We have npm scripts set up to run a full clean, build, package, symlinked install, ti sdk select
the built sdk, and then run the unit test suite:
npm run test:android
npm run test:iphone
npm run test:ipad
The test suite generates a single Titanium SDK project targeting the specified platform(s), builds the project for emulator, launches the app on the emulator and then runs a series of tests defined via ti-mocha and should.js.
The tests spit out their results to the console log, and the test scripts listen to the logs to gather the results. We then generate an overview on the console as well as a junit report xml file (to be consume by CI build systems like Jenkins).
The tests
folder contains the test suite. Any files living within that directory are copied on top of the test app's structure.
The gradle (tool, build system) and gradle plugin (plugin that adds several features that are specific to building Android apps) version numbers are located in:
android/build.gradle
android/gradle/wrapper/gradle-wrapper.properties
android/templates/build/root.build.gradle
.
You can run ./android/gradlew wrapper --gradle-version 7.4.2 --distribution-type all
to update the gradle tool. It will download the version, change the gradle-wrapper.properties
link, update the gradlew file and the gradle-wrapper.jar.
To update the plugin to a newer version (check https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google) you have to change the build.gradle
and root.build.gradle
from the links above.
When you change the gradle plugin make sure to look at the Compatibility
section at https://developer.android.com/studio/releases/gradle-plugin#compatibility-7-1-0 and adjust the android build tools
section in android/package.json
.
If needed make sure the other libraries e.g. the kotlin version in build.gradle
are working with the current setup.
After you've made the changes and compiled the SDK make sure to run the test suite, build the kitchensink and hyperloop example app. Create a and build a module (java and kotlin) and run those in a test app too.
Some modules like ti.map or ti.facebook are included with the SDK. To update to the latest versions you have to edit the links in support/module/packaged/modules.json
and run node build/scons-modules-integrity.js
. This will download the files and update the integrity values.
The /android/titanium/build.gradle
file contains various Android libraries that are used in the SDK. If you want to update them check the corresponding release pages:
- https://developer.android.com/jetpack/androidx/releases/recyclerview
- https://developer.android.com/jetpack/androidx/releases/swiperefreshlayout
- https://developer.android.com/jetpack/androidx/releases/camera
- https://developer.android.com/jetpack/androidx/releases/transition
- https://developer.android.com/jetpack/androidx/releases/vectordrawable
- https://developer.android.com/jetpack/androidx/releases/viewpager
- https://developer.android.com/jetpack/androidx/releases/cardview
- https://developer.android.com/jetpack/androidx/releases/drawerlayout
- https://developer.android.com/jetpack/androidx/releases/exifinterface
- https://developer.android.com/jetpack/androidx/releases/media
for a new version and change the number in the build.gradle file. Some version numbers are managed inside
/android/templates/build/ti.constants.gradle
. After that build the SDK and runnpm run test
to see if everything is still running. Building Kitchensink, Hyperloop-examples and a custom app is also helpful.
If you want to help updating and improving the documentation you can checkout the repository and edit the files in /apidoc/
. Those files are shown in the API documentation at https://titaniumsdk.com/api/ and include all methods, properties, examples and so on. After you made changes run npm run lint:docs
to see if your changes produce a valid documentation. The PR commit title you create should start with docs:
and a proper title like: docs: updated textfield examples
.
All other documentation files (e.g. the guides) are located in the https://github.com/tidev/titanium-docs repository. In case you want to update guides, tutorials or spelling mistakes you clone that repo and follow the README file inside the main folder.
Interested in contributing? There are several ways you can help contribute to this project.
Source code contributions are always welcome! Before we can accept your pull request, you must sign a Contributor License Agreement (CLA). Please visit https://tidev.io/contribute for more information.
Please consider supporting this project by making a charitable donation. The money you donate goes to compensate the skilled engineeers and maintainers that keep this project going.
TiDev wants to provide a safe and welcoming community for everyone to participate. Please see our Code of Conduct that applies to all contributors.
If you find a security related issue, please send an email to [email protected] instead of publicly creating a ticket.
For the latest information, please find us on Twitter: Titanium SDK and TiDev.
Join our growing Slack community by visiting https://slack.tidev.io
Titanium is a registered trademark of TiDev Inc. All Titanium trademark and patent rights were transferred and assigned to TiDev Inc. on 4/7/2022. Please see the LEGAL information about using our trademarks, privacy policy, terms of usage and other legal information at https://tidev.io/legal.