@maccesar/titools 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS-TEMPLATE.md +173 -0
- package/README.md +867 -0
- package/agents/ti-researcher.md +108 -0
- package/bin/titools.js +53 -0
- package/lib/commands/agents.js +126 -0
- package/lib/commands/install.js +188 -0
- package/lib/commands/uninstall.js +215 -0
- package/lib/commands/update.js +159 -0
- package/lib/config.js +119 -0
- package/lib/downloader.js +153 -0
- package/lib/installer.js +253 -0
- package/lib/platform.js +108 -0
- package/lib/symlink.js +142 -0
- package/lib/utils.js +270 -0
- package/package.json +67 -0
- package/skills/alloy-expert/SKILL.md +247 -0
- package/skills/alloy-expert/assets/ControllerAutoCleanup.js +182 -0
- package/skills/alloy-expert/references/alloy-structure.md +381 -0
- package/skills/alloy-expert/references/anti-patterns.md +133 -0
- package/skills/alloy-expert/references/code-conventions.md +469 -0
- package/skills/alloy-expert/references/contracts.md +280 -0
- package/skills/alloy-expert/references/controller-patterns.md +520 -0
- package/skills/alloy-expert/references/error-handling.md +484 -0
- package/skills/alloy-expert/references/examples.md +735 -0
- package/skills/alloy-expert/references/migration-patterns.md +298 -0
- package/skills/alloy-expert/references/patterns.md +448 -0
- package/skills/alloy-expert/references/performance-patterns.md +855 -0
- package/skills/alloy-expert/references/security-patterns.md +847 -0
- package/skills/alloy-expert/references/state-management.md +779 -0
- package/skills/alloy-expert/references/testing.md +872 -0
- package/skills/alloy-guides/SKILL.md +214 -0
- package/skills/alloy-guides/references/CLI_TASKS.md +243 -0
- package/skills/alloy-guides/references/CONCEPTS.md +191 -0
- package/skills/alloy-guides/references/CONTROLLERS.md +298 -0
- package/skills/alloy-guides/references/MODELS.md +1028 -0
- package/skills/alloy-guides/references/PURGETSS.md +56 -0
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +242 -0
- package/skills/alloy-guides/references/VIEWS_STYLES.md +388 -0
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +109 -0
- package/skills/alloy-guides/references/VIEWS_XML.md +558 -0
- package/skills/alloy-guides/references/WIDGETS.md +176 -0
- package/skills/alloy-howtos/SKILL.md +203 -0
- package/skills/alloy-howtos/references/best_practices.md +138 -0
- package/skills/alloy-howtos/references/cli_reference.md +253 -0
- package/skills/alloy-howtos/references/config_files.md +87 -0
- package/skills/alloy-howtos/references/custom_tags.md +147 -0
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +101 -0
- package/skills/alloy-howtos/references/samples.md +167 -0
- package/skills/purgetss/SKILL.md +442 -0
- package/skills/purgetss/assets/purgetss.config.cjs +17 -0
- package/skills/purgetss/references/EXAMPLES.md +247 -0
- package/skills/purgetss/references/animation-system.md +1294 -0
- package/skills/purgetss/references/apply-directive.md +375 -0
- package/skills/purgetss/references/arbitrary-values.md +612 -0
- package/skills/purgetss/references/class-index.md +1350 -0
- package/skills/purgetss/references/cli-commands.md +948 -0
- package/skills/purgetss/references/configurable-properties.md +654 -0
- package/skills/purgetss/references/custom-rules.md +161 -0
- package/skills/purgetss/references/customization-deep-dive.md +722 -0
- package/skills/purgetss/references/dynamic-component-creation.md +489 -0
- package/skills/purgetss/references/grid-layout.md +455 -0
- package/skills/purgetss/references/icon-fonts.md +609 -0
- package/skills/purgetss/references/installation-setup.md +366 -0
- package/skills/purgetss/references/opacity-modifier.md +291 -0
- package/skills/purgetss/references/platform-modifiers.md +479 -0
- package/skills/purgetss/references/smart-mappings.md +42 -0
- package/skills/purgetss/references/titanium-resets.md +359 -0
- package/skills/purgetss/references/ui-ux-design.md +1526 -0
- package/skills/ti-guides/SKILL.md +94 -0
- package/skills/ti-guides/references/advanced-data-and-images.md +19 -0
- package/skills/ti-guides/references/alloy-cli-advanced.md +84 -0
- package/skills/ti-guides/references/alloy-data-mastery.md +29 -0
- package/skills/ti-guides/references/alloy-widgets-and-themes.md +19 -0
- package/skills/ti-guides/references/android-manifest.md +97 -0
- package/skills/ti-guides/references/app-distribution.md +258 -0
- package/skills/ti-guides/references/application-frameworks.md +377 -0
- package/skills/ti-guides/references/cli-reference.md +402 -0
- package/skills/ti-guides/references/coding-best-practices.md +102 -0
- package/skills/ti-guides/references/commonjs-advanced.md +134 -0
- package/skills/ti-guides/references/hello-world.md +100 -0
- package/skills/ti-guides/references/hyperloop-native-access.md +62 -0
- package/skills/ti-guides/references/javascript-primer.md +411 -0
- package/skills/ti-guides/references/reserved-words.md +36 -0
- package/skills/ti-guides/references/resources.md +183 -0
- package/skills/ti-guides/references/style-and-conventions.md +48 -0
- package/skills/ti-guides/references/tiapp-config.md +609 -0
- package/skills/ti-howtos/SKILL.md +174 -0
- package/skills/ti-howtos/references/android-platform-deep-dives.md +658 -0
- package/skills/ti-howtos/references/automation-fastlane-appium.md +95 -0
- package/skills/ti-howtos/references/buffer-codec-streams.md +140 -0
- package/skills/ti-howtos/references/cross-platform-development.md +348 -0
- package/skills/ti-howtos/references/debugging-profiling.md +543 -0
- package/skills/ti-howtos/references/extending-titanium.md +723 -0
- package/skills/ti-howtos/references/google-maps-v2.md +169 -0
- package/skills/ti-howtos/references/ios-map-kit.md +143 -0
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +783 -0
- package/skills/ti-howtos/references/local-data-sources.md +301 -0
- package/skills/ti-howtos/references/location-and-maps.md +252 -0
- package/skills/ti-howtos/references/media-apis.md +210 -0
- package/skills/ti-howtos/references/notification-services.md +599 -0
- package/skills/ti-howtos/references/remote-data-sources.md +349 -0
- package/skills/ti-howtos/references/tutorials.md +502 -0
- package/skills/ti-howtos/references/using-modules.md +237 -0
- package/skills/ti-howtos/references/web-content-integration.md +307 -0
- package/skills/ti-howtos/references/webpack-build-pipeline.md +78 -0
- package/skills/ti-ui/SKILL.md +179 -0
- package/skills/ti-ui/references/accessibility-deep-dive.md +242 -0
- package/skills/ti-ui/references/animation-and-matrices.md +599 -0
- package/skills/ti-ui/references/application-structures.md +655 -0
- package/skills/ti-ui/references/custom-fonts-styling.md +579 -0
- package/skills/ti-ui/references/event-handling.md +393 -0
- package/skills/ti-ui/references/gestures.md +473 -0
- package/skills/ti-ui/references/icons-and-splash-screens.md +409 -0
- package/skills/ti-ui/references/layouts-and-positioning.md +462 -0
- package/skills/ti-ui/references/listviews-and-performance.md +619 -0
- package/skills/ti-ui/references/orientation.md +362 -0
- package/skills/ti-ui/references/platform-ui-android.md +635 -0
- package/skills/ti-ui/references/platform-ui-ios.md +469 -0
- package/skills/ti-ui/references/scrolling-views.md +252 -0
- package/skills/ti-ui/references/tableviews.md +568 -0
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
# tiapp.xml and timodule.xml Configuration
|
|
2
|
+
|
|
3
|
+
Complete reference for Titanium app configuration files. `tiapp.xml` is the main config file for Titanium apps. `timodule.xml` is for custom modules.
|
|
4
|
+
|
|
5
|
+
## tiapp.xml Structure
|
|
6
|
+
|
|
7
|
+
```xml
|
|
8
|
+
<ti:app xmlns:ti="http://ti.tidev.io">
|
|
9
|
+
<id>com.titaniumsdk.helloWorld</id>
|
|
10
|
+
<name>helloWorld</name>
|
|
11
|
+
<version>1.0.1</version>
|
|
12
|
+
<icon>appicon.png</icon>
|
|
13
|
+
<fullscreen>false</fullscreen>
|
|
14
|
+
<navbar-hidden>false</navbar-hidden>
|
|
15
|
+
<analytics>false</analytics>
|
|
16
|
+
<guid>GUID</guid>
|
|
17
|
+
<ios>
|
|
18
|
+
<plist>
|
|
19
|
+
<dict>
|
|
20
|
+
<key>UISupportedInterfaceOrientations~iphone</key>
|
|
21
|
+
<array>
|
|
22
|
+
<string>Ti.UI.PORTRAIT</string>
|
|
23
|
+
</array>
|
|
24
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
25
|
+
<array>
|
|
26
|
+
<string>Ti.UI.PORTRAIT</string>
|
|
27
|
+
<string>Ti.UI.UPSIDE_PORTRAIT</string>
|
|
28
|
+
<string>Ti.UI.LANDSCAPE_LEFT</string>
|
|
29
|
+
<string>Ti.UI.LANDSCAPE_RIGHT</string>
|
|
30
|
+
</array>
|
|
31
|
+
</dict>
|
|
32
|
+
</plist>
|
|
33
|
+
</ios>
|
|
34
|
+
<android xmlns:android="http://schemas.android.com/apk/res/android">
|
|
35
|
+
<tool-api-level>10</tool-api-level>
|
|
36
|
+
<abi>all</abi>
|
|
37
|
+
</android>
|
|
38
|
+
<modules/>
|
|
39
|
+
</ti:app>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**WARNING**: tiapp.xml properties are encrypted when building for production.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Top-Level Elements
|
|
47
|
+
|
|
48
|
+
### Required Elements
|
|
49
|
+
|
|
50
|
+
#### `<guid>`
|
|
51
|
+
**Required.** Unique ID generated by CLI. Do not modify unless you know what you're doing.
|
|
52
|
+
|
|
53
|
+
#### `<id>`
|
|
54
|
+
**Required.** Application ID.
|
|
55
|
+
|
|
56
|
+
- **Android**: Package ID following [Java Package Naming Standards](http://download.oracle.com/javase/tutorial/java/package/namingpkgs.html)
|
|
57
|
+
- **iOS**: Must match Bundle ID from Apple Developer Portal
|
|
58
|
+
|
|
59
|
+
```xml
|
|
60
|
+
<id>com.mycompany.fakeblock</id>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
#### `<name>`
|
|
64
|
+
**Required.** Application name shown under icon on device.
|
|
65
|
+
|
|
66
|
+
```xml
|
|
67
|
+
<name>Fakeblock</name>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Android warning**: If name starts with a digit, prefix activity name with underscore (e.g., `_2Foo`).
|
|
71
|
+
|
|
72
|
+
### Optional Elements
|
|
73
|
+
|
|
74
|
+
#### `<copyright>`
|
|
75
|
+
Application copyright.
|
|
76
|
+
|
|
77
|
+
#### `<description>`
|
|
78
|
+
Application description.
|
|
79
|
+
|
|
80
|
+
```xml
|
|
81
|
+
<description>Tap to rock out with this block.</description>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### `<fullscreen>`
|
|
85
|
+
Start app in fullscreen (hides status bar).
|
|
86
|
+
|
|
87
|
+
```xml
|
|
88
|
+
<fullscreen>false</fullscreen> <!-- default -->
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### `<icon>`
|
|
92
|
+
Icon filename relative to `Resources/` or platform-specific folder.
|
|
93
|
+
|
|
94
|
+
```xml
|
|
95
|
+
<icon>appicon.png</icon>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
#### `<navbar-hidden>`
|
|
99
|
+
Hide navigation bar.
|
|
100
|
+
|
|
101
|
+
```xml
|
|
102
|
+
<navbar-hidden>false</navbar-hidden> <!-- default -->
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Android**: Removes top action/title bar.
|
|
106
|
+
|
|
107
|
+
#### `<publisher>`
|
|
108
|
+
Application publisher.
|
|
109
|
+
|
|
110
|
+
```xml
|
|
111
|
+
<publisher>Bluth Company</publisher>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
#### `<statusbar-hidden>`
|
|
115
|
+
**Android only.** Hide status bar.
|
|
116
|
+
|
|
117
|
+
```xml
|
|
118
|
+
<statusbar-hidden>false</statusbar-hidden> <!-- default -->
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### `<url>`
|
|
122
|
+
Application URL.
|
|
123
|
+
|
|
124
|
+
```xml
|
|
125
|
+
<url>http://www.bluthcompany.com/fakeblock</url>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### `<version>`
|
|
129
|
+
Application version.
|
|
130
|
+
|
|
131
|
+
```xml
|
|
132
|
+
<version>3.1.4</version>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**iOS**: Truncated to 3 dot-separated numbers (e.g., `2.1.0.1` → `2.1.0`).
|
|
136
|
+
|
|
137
|
+
#### `<sdk-version>`
|
|
138
|
+
Titanium SDK to build against.
|
|
139
|
+
|
|
140
|
+
```xml
|
|
141
|
+
<sdk-version>11.1.0.GA</sdk-version>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### `<deployment-targets>`
|
|
145
|
+
IDE deployment menu options.
|
|
146
|
+
|
|
147
|
+
```xml
|
|
148
|
+
<deployment-targets>
|
|
149
|
+
<target device="android">true</target>
|
|
150
|
+
<target device="ipad">false</target>
|
|
151
|
+
<target device="iphone">false</target>
|
|
152
|
+
</deployment-targets>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### `<modules>`
|
|
156
|
+
Include Titanium modules.
|
|
157
|
+
|
|
158
|
+
```xml
|
|
159
|
+
<modules>
|
|
160
|
+
<module>ti.map</module>
|
|
161
|
+
<module platform="android">ti.map</module>
|
|
162
|
+
<module platform="ios">ti.map</module>
|
|
163
|
+
<module version="2.0.0">ti.alloy</module>
|
|
164
|
+
<module deploy-type="production">ti.analytics</module>
|
|
165
|
+
</modules>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Attributes:**
|
|
169
|
+
- `platform`: `android`, `commonjs`, `iphone`
|
|
170
|
+
- `version`: Specific module version
|
|
171
|
+
- `deploy-type`: `development`, `test`, `production` (comma-separated)
|
|
172
|
+
|
|
173
|
+
#### `<plugins>`
|
|
174
|
+
Include plugins (in `plugins/` folder).
|
|
175
|
+
|
|
176
|
+
```xml
|
|
177
|
+
<plugins>
|
|
178
|
+
<plugin version="1.0">ti.alloy</plugin>
|
|
179
|
+
</plugins>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Application Properties
|
|
185
|
+
|
|
186
|
+
Custom properties accessible via `Titanium.App.Properties`. Read-only in production.
|
|
187
|
+
|
|
188
|
+
```xml
|
|
189
|
+
<property name="name" type="type">value</property>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Types:** `string`, `bool`, `int`, `double`
|
|
193
|
+
|
|
194
|
+
### Special Properties
|
|
195
|
+
|
|
196
|
+
#### `ti.ui.defaultunit`
|
|
197
|
+
Default unit for sizes/positions.
|
|
198
|
+
|
|
199
|
+
```xml
|
|
200
|
+
<property name="ti.ui.defaultunit">system</property>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**Values:** `system`, `cm`, `dip`/`dp`, `in`, `mm`, `px`
|
|
204
|
+
|
|
205
|
+
#### `appc-sourcecode-encryption-policy`
|
|
206
|
+
Encryption policy for app assets.
|
|
207
|
+
|
|
208
|
+
```xml
|
|
209
|
+
<property name="appc-sourcecode-encryption-policy">remote</property>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Values:**
|
|
213
|
+
- `embed`: Key embedded in binary (padded/obfuscated)
|
|
214
|
+
- `remote`: Key stored remotely (requires internet, default)
|
|
215
|
+
|
|
216
|
+
#### `appc-security-jailbreak-detect`
|
|
217
|
+
Prevent running on jailbroken/rooted devices.
|
|
218
|
+
|
|
219
|
+
```xml
|
|
220
|
+
<property name="appc-security-jailbreak-detect">true</property>
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**Requires**: `appc-sourcecode-encryption-policy` set to `remote`
|
|
224
|
+
|
|
225
|
+
#### `appc-security-debugger-detect`
|
|
226
|
+
Prevent debugger connections.
|
|
227
|
+
|
|
228
|
+
```xml
|
|
229
|
+
<property name="appc-security-debugger-detect">true</property>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Requires**: `appc-sourcecode-encryption-policy` set to `remote`
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Android Section
|
|
237
|
+
|
|
238
|
+
```xml
|
|
239
|
+
<android xmlns:android="http://schemas.android.com/apk/res/android">
|
|
240
|
+
<abi>all</abi>
|
|
241
|
+
<activities>
|
|
242
|
+
<activity url="activity.js"/>
|
|
243
|
+
</activities>
|
|
244
|
+
<services>
|
|
245
|
+
<service url="service.js" type="standard"/>
|
|
246
|
+
</services>
|
|
247
|
+
<manifest>
|
|
248
|
+
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14"/>
|
|
249
|
+
<application>
|
|
250
|
+
<activity>...</activity>
|
|
251
|
+
<service>...</service>
|
|
252
|
+
</application>
|
|
253
|
+
</manifest>
|
|
254
|
+
</android>
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Elements
|
|
258
|
+
|
|
259
|
+
#### `<abi>`
|
|
260
|
+
Target ABI architecture (V8 runtime only).
|
|
261
|
+
|
|
262
|
+
```xml
|
|
263
|
+
<abi>all</abi> <!-- default -->
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Values:** `all`, `arm64-v8a`, `armeabi-v7a`, `x86`, `x86_64`
|
|
267
|
+
|
|
268
|
+
Targeting specific ABI reduces APK size but device compatibility.
|
|
269
|
+
|
|
270
|
+
#### `<activities>`
|
|
271
|
+
Custom JavaScript-based Android activities.
|
|
272
|
+
|
|
273
|
+
```xml
|
|
274
|
+
<activities>
|
|
275
|
+
<activity url="activity.js">
|
|
276
|
+
<!-- Android Manifest elements -->
|
|
277
|
+
</activity>
|
|
278
|
+
</activities>
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
#### `<services>`
|
|
282
|
+
Custom JavaScript-based Android services (background processes).
|
|
283
|
+
|
|
284
|
+
```xml
|
|
285
|
+
<services>
|
|
286
|
+
<service url="service.js" type="standard"/>
|
|
287
|
+
</services>
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
#### `<manifest>`
|
|
291
|
+
Ad-hoc [AndroidManifest.xml](http://developer.android.com/guide/topics/manifest/manifest-intro.html) elements.
|
|
292
|
+
|
|
293
|
+
**Set target/minimum SDK:**
|
|
294
|
+
```xml
|
|
295
|
+
<android xmlns:android="http://schemas.android.com/apk/res/android">
|
|
296
|
+
<manifest>
|
|
297
|
+
<!-- Target Android 10.0, min Android 5.0 -->
|
|
298
|
+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
|
|
299
|
+
</manifest>
|
|
300
|
+
</android>
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Screen density support:**
|
|
304
|
+
```xml
|
|
305
|
+
<manifest>
|
|
306
|
+
<supports-screens
|
|
307
|
+
android:smallScreens="true"
|
|
308
|
+
android:normalScreens="true"
|
|
309
|
+
android:largeScreens="true"
|
|
310
|
+
android:xlargeScreens="true"
|
|
311
|
+
/>
|
|
312
|
+
</manifest>
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**WARNING**: Do NOT set `android:anyDensity="false"`.
|
|
316
|
+
|
|
317
|
+
**Enable debugging:**
|
|
318
|
+
```xml
|
|
319
|
+
<manifest>
|
|
320
|
+
<application android:debuggable="true" />
|
|
321
|
+
</manifest>
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
**Install location:**
|
|
325
|
+
```xml
|
|
326
|
+
<manifest android:installLocation="preferExternal">
|
|
327
|
+
<uses-sdk android:minSdkVersion="7" />
|
|
328
|
+
</manifest>
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Values:** `preferExternal`, `auto`, `internalOnly`
|
|
332
|
+
|
|
333
|
+
**Request large heap:**
|
|
334
|
+
```xml
|
|
335
|
+
<manifest>
|
|
336
|
+
<application android:largeHeap="true"/>
|
|
337
|
+
</manifest>
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Android-Specific Properties
|
|
341
|
+
|
|
342
|
+
| Property | Type | Default | Description |
|
|
343
|
+
| -------------------------------------- | ------ | ------- | ------------------------------------------ |
|
|
344
|
+
| `ti.android.shake.factor` | double | 1.3 | Shake event sensitivity |
|
|
345
|
+
| `ti.android.shake.quiet.milliseconds` | int | 500 | Quiet time before shake event |
|
|
346
|
+
| `ti.android.shake.active.milliseconds` | int | 1000 | Active time for shake event |
|
|
347
|
+
| `ti.android.httpclient.maxbuffersize` | int | 524288 | HTTP response buffer size (bytes) |
|
|
348
|
+
| `ti.android.compilejs` | bool | - | Enable JS compilation (default: dist only) |
|
|
349
|
+
| `ti.android.debug` | bool | false | Enable detailed logging |
|
|
350
|
+
|
|
351
|
+
```xml
|
|
352
|
+
<property name="ti.android.fastdev">false</property>
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## iOS Section
|
|
358
|
+
|
|
359
|
+
```xml
|
|
360
|
+
<ti:app>
|
|
361
|
+
<ios>
|
|
362
|
+
<team-id>YOUR_TEAM_ID</team-id>
|
|
363
|
+
<entitlements>
|
|
364
|
+
<dict>
|
|
365
|
+
<key>com.apple.security.application-groups</key>
|
|
366
|
+
<array>
|
|
367
|
+
<string>group.com.titaniumsdk.mycoolapp</string>
|
|
368
|
+
</array>
|
|
369
|
+
</dict>
|
|
370
|
+
</entitlements>
|
|
371
|
+
<extensions>
|
|
372
|
+
...
|
|
373
|
+
</extensions>
|
|
374
|
+
<plist>
|
|
375
|
+
<dict>
|
|
376
|
+
<!-- Info.plist entries -->
|
|
377
|
+
</dict>
|
|
378
|
+
</plist>
|
|
379
|
+
<use-autolayout>true</use-autolayout>
|
|
380
|
+
<min-ios-ver>9.0</min-ios-ver>
|
|
381
|
+
</ios>
|
|
382
|
+
</ti:app>
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Elements
|
|
386
|
+
|
|
387
|
+
#### `<team-id>`
|
|
388
|
+
**Since 5.0.0.** Required for app extensions (share, watch, Siri).
|
|
389
|
+
|
|
390
|
+
```xml
|
|
391
|
+
<team-id>YOUR_TEAM_ID</team-id>
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
#### `<entitlements>`
|
|
395
|
+
**Since 6.1.0.** Target entitlements (merged with internal entitlements).
|
|
396
|
+
|
|
397
|
+
```xml
|
|
398
|
+
<entitlements>
|
|
399
|
+
<dict>
|
|
400
|
+
<key>com.apple.security.application-groups</key>
|
|
401
|
+
<array>
|
|
402
|
+
<string>group.com.titaniumsdk.mycoolapp</string>
|
|
403
|
+
</array>
|
|
404
|
+
</dict>
|
|
405
|
+
</entitlements>
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
#### `<extensions>`
|
|
409
|
+
**Since 5.0.0.** iOS extensions.
|
|
410
|
+
|
|
411
|
+
```xml
|
|
412
|
+
<extensions>
|
|
413
|
+
<extension projectPath="extensions/foo/foo.xcodeproj">
|
|
414
|
+
<target name="foo WatchApp Extension">
|
|
415
|
+
<provisioning-profiles>
|
|
416
|
+
<devices/>
|
|
417
|
+
<dist-appstore/>
|
|
418
|
+
<dist-adhoc/>
|
|
419
|
+
</provisioning-profiles>
|
|
420
|
+
</target>
|
|
421
|
+
</extension>
|
|
422
|
+
</extensions>
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
#### `<min-ios-ver>`
|
|
426
|
+
Minimum iOS version.
|
|
427
|
+
|
|
428
|
+
```xml
|
|
429
|
+
<min-ios-ver>9.0</min-ios-ver> <!-- default -->
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
#### `<min-sdk-ver>`
|
|
433
|
+
Minimum Xcode version.
|
|
434
|
+
|
|
435
|
+
```xml
|
|
436
|
+
<min-sdk-ver>9.0</min-sdk-ver> <!-- default -->
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
#### `<plist>`
|
|
440
|
+
Settings for generated `Info.plist`. Uses key/value pairs.
|
|
441
|
+
|
|
442
|
+
**Orientations:**
|
|
443
|
+
```xml
|
|
444
|
+
<plist>
|
|
445
|
+
<dict>
|
|
446
|
+
<key>UISupportedInterfaceOrientations~iphone</key>
|
|
447
|
+
<array>
|
|
448
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
449
|
+
</array>
|
|
450
|
+
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
451
|
+
<array>
|
|
452
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
453
|
+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
454
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
455
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
456
|
+
</array>
|
|
457
|
+
</dict>
|
|
458
|
+
</plist>
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
**Background modes:**
|
|
462
|
+
```xml
|
|
463
|
+
<plist>
|
|
464
|
+
<dict>
|
|
465
|
+
<key>UIBackgroundModes</key>
|
|
466
|
+
<array>
|
|
467
|
+
<string>audio</string>
|
|
468
|
+
<string>location</string>
|
|
469
|
+
<string>voip</string>
|
|
470
|
+
</array>
|
|
471
|
+
</dict>
|
|
472
|
+
</plist>
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**Device capabilities:**
|
|
476
|
+
```xml
|
|
477
|
+
<plist>
|
|
478
|
+
<dict>
|
|
479
|
+
<key>UIRequiredDeviceCapabilities</key>
|
|
480
|
+
<array>
|
|
481
|
+
<string>telephony</string>
|
|
482
|
+
<string>wifi</string>
|
|
483
|
+
<string>gps</string>
|
|
484
|
+
<string>accelerometer</string>
|
|
485
|
+
</array>
|
|
486
|
+
</dict>
|
|
487
|
+
</plist>
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
**Persistent WiFi:**
|
|
491
|
+
```xml
|
|
492
|
+
<key>UIRequiresPersistentWiFi</key><true/>
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
**Status bar style:**
|
|
496
|
+
```xml
|
|
497
|
+
<key>UIStatusBarStyle</key><string>UIStatusBarStyleBlackTranslucent</string>
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
**iOS 9 URL schemes:**
|
|
501
|
+
```xml
|
|
502
|
+
<key>LSApplicationQueriesSchemes</key>
|
|
503
|
+
<array>
|
|
504
|
+
<string>fbapi</string>
|
|
505
|
+
<string>fbauth2</string>
|
|
506
|
+
<string>twitter</string>
|
|
507
|
+
<string>whatsapp</string>
|
|
508
|
+
<string>instagram</string>
|
|
509
|
+
<string>comgooglemaps</string>
|
|
510
|
+
</array>
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
#### `<use-app-thinning>`
|
|
514
|
+
**Since 5.1.0.** Enable App Thinning with Asset Catalog.
|
|
515
|
+
|
|
516
|
+
```xml
|
|
517
|
+
<use-app-thinning>true</use-app-thinning>
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
**NOTE**: Use `Ti.Filesystem.getAsset()` to read images from Asset Catalog.
|
|
521
|
+
|
|
522
|
+
#### `<use-autolayout>`
|
|
523
|
+
**Since 5.1.0.** Enable iOS auto-layout engine.
|
|
524
|
+
|
|
525
|
+
```xml
|
|
526
|
+
<use-autolayout>true</use-autolayout>
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
#### `<log-server-port>`
|
|
530
|
+
**Since 6.0.0.** Custom log server port.
|
|
531
|
+
|
|
532
|
+
```xml
|
|
533
|
+
<log-server-port>27973</log-server-port>
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
### Unsupported Info.plist Keys
|
|
537
|
+
|
|
538
|
+
These are auto-generated by Titanium and CANNOT be overridden:
|
|
539
|
+
- `CFBundleDisplayName`
|
|
540
|
+
- `CFBundleExecutable`
|
|
541
|
+
- `CFBundleIconFile`
|
|
542
|
+
- `CFBundleIconFiles`
|
|
543
|
+
- `CFBundleIdentifier`
|
|
544
|
+
- `CFBundleInfoDictionaryVersion`
|
|
545
|
+
- `CFBundleName`
|
|
546
|
+
- `CFBundlePackageType`
|
|
547
|
+
- `CFBundleSignature`
|
|
548
|
+
- `CFBundleVersion` (pre-4.1.0)
|
|
549
|
+
- `CFBundleShortVersionString` (pre-4.1.0)
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
## Google Play Services
|
|
554
|
+
|
|
555
|
+
**Since 9.0.0.** Automatic validation of Google Play Services. Disable if needed:
|
|
556
|
+
|
|
557
|
+
```xml
|
|
558
|
+
<property name="ti.playservices.validate.on.startup" type="bool">false</property>
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
---
|
|
562
|
+
|
|
563
|
+
## timodule.xml (Module Configuration)
|
|
564
|
+
|
|
565
|
+
Used in custom Titanium modules. Follows same structure as `tiapp.xml` but only contains platform-specific config (mainly Android).
|
|
566
|
+
|
|
567
|
+
Supports token substitution for app-specific values:
|
|
568
|
+
|
|
569
|
+
```xml
|
|
570
|
+
<!-- timodule.xml -->
|
|
571
|
+
<android xmlns:android="http://schemas.android.com/apk/res/android">
|
|
572
|
+
<manifest>
|
|
573
|
+
<permission android:name="${tiapp.properties['id']}.permission.MY_NEW_PERMISSION"
|
|
574
|
+
android:protectionLevel="signature" />
|
|
575
|
+
</manifest>
|
|
576
|
+
</android>
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
Becomes (for app with ID `com.example.app`):
|
|
580
|
+
|
|
581
|
+
```xml
|
|
582
|
+
<permission android:name="com.example.app.permission.MY_NEW_PERMISSION"
|
|
583
|
+
android:protectionLevel="signature" />
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
**Access properties:**
|
|
587
|
+
- `${tiapp.properties['id']}` - App ID
|
|
588
|
+
- `${tiapp.properties['name']}` - App name
|
|
589
|
+
- `${tiapp.properties['version']}` - App version
|
|
590
|
+
- `${tiapp.properties['publisher']}` - Publisher
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
## SDK Version Precedence
|
|
595
|
+
|
|
596
|
+
The CLI checks SDK version in this order:
|
|
597
|
+
|
|
598
|
+
1. `tiapp.xml` `<sdk-version>` tag
|
|
599
|
+
2. `--sdk` CLI option
|
|
600
|
+
3. `app.sdk` config setting (`ti config app.sdk <version>`)
|
|
601
|
+
4. SDK select version (`ti sdk select`)
|
|
602
|
+
|
|
603
|
+
---
|
|
604
|
+
|
|
605
|
+
## References
|
|
606
|
+
|
|
607
|
+
- [Android Manifest docs](http://developer.android.com/guide/topics/manifest/manifest-intro.html)
|
|
608
|
+
- [iOS Info.plist Key Reference](http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html)
|
|
609
|
+
- [Java Package Naming](http://download.oracle.com/javase/tutorial/java/package/namingpkgs.html)
|