This plugin helps configuring different profiles for Appcelerator Titanium projects. Each profile can use it’s own application id, name, tiapp properties and skin.
To always load the plugin, you need to add the `commands` and `hooks` directories to the Titanium CLI’s paths configuration:
ti config -a paths.commands /path/to/plugin/commands
ti config -a paths.hooks /path/to/plugin/hooksAlternatively, you may extract the plugin to the global Titanium installation folder or project directory, then enable it in the `tiapp.xml`:
<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
<plugins>
<plugin version="1.0">ti.multiconfiguration</plugin>
</plugins>
</ti:app>Your $PATH should contain rsync command.
You can specify path to the configuration file with --build-config option.
By default it’s <PROJECT_DIR>/config.json. Configuration file contains a
list of profiles.
Example:
{
"PROFILES": {
"profile1": {
"properties": {
"aaa.bbb": 42
"data.url": "https://foo.com"
},
"id": "com.foo",
"name": "Foo",
"theme": "foo",
},
"profile2": {
"properties": {
"aaa.bbb": 100
"data.url": "https://bar.com"
},
"id": "com.bar",
"name": "Bar",
"theme": "bar",
"android-theme": "simple"
},
"profile3": {
"properties": {
"aaa.bbb": 200
"data.url": "https://baz.com"
},
"id": "com.baz",
"name": "Baz",
"theme": "baz",
"android-theme": null
}
}
}Each profile should contain an application id and name. You also can specify theme
id for profile. If android-theme property specified in profile Android
theme @style/Theme.Multiconfiguration.<android-theme> will be used
for application. If android-theme property is null Android theme won’t be customized.
When theme is present plugin will inject specified theme as if it was set with
--theme= CLI argument.
You need to specify profile name with a --build-profile argument.
Example:
ti build -p iphone --build-profile profile2 --build-config profiles.json
To package the plugin, run:
node build.js