Once you've found a module you wish to use in your mobile project, you'll need to install it such that you can use it inside Titanium Studio.
Go to http://marketplace.appcelerator.com to find the most complete list of available modules.
Once you have selected and purchased the modules you are interested in using, you'll need to download them.
- In marketplace.appcelerator.com, click on My Products.
- Click on the module you wish to download. It should download a .zip file to your computer. You may need to click on the little gear icon to find the download link the first time you download a module.
- Locate the .zip file on disk.
Modules can be installed one of two ways--per-project, or globally.
- Open Titanium Studio.
- Expand the project folder in Project Explorer or select the project in the App Explorer menu.
- Drag the .zip file from the download location into the current project, placing it at the root of the project. Choose to "Copy Files".
- Locate your Titanium SDK installation location. For help, see Downloading Titanium SDKs in Titanium Studio for the default location of the SDK folder.
- Drag the .zip file under the /Titanium folder. As an example, on OS X, the path might look like "/Library/Application Support/Titanium/module.zip".
On OS X Lion, the Titanium SDK folder may be hidden. Use Shift+Command+G in the Finder to open a dialog allowing you to navigate to the folder directly
Using Your Module
To use your module in a Titanium Mobile app, follow these steps:
- Open the module's .zip file, and look at the folder structure. The path will look like the following:
- Open Titanium Studio, and the tiapp.xml file for the project in question.
- Switch to the tiapp.xml tab.
- In the application's tiapp.xml, find the <modules/> node, and replace it with the new <modules> content. If you already have modules, just add a new node for the new module:
- Use the require function to load the module in the app's code, for example:
- The next time the app is launched or built, the module should be included with the application.