@maccesar/titools 5.3.0 → 5.4.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/CONTRIBUTING.md +1 -1
- package/README.md +31 -60
- package/agents/ti-pro.md +3 -1
- package/commands/ti-audit.md +6 -4
- package/docs/examples.md +9 -0
- package/docs/knowledge-index.md +2 -1
- package/lib/config.js +1 -0
- package/package.json +1 -1
- package/skills/alloy-guides/SKILL.md +18 -179
- package/skills/alloy-guides/references/CLI_TASKS.md +17 -216
- package/skills/alloy-guides/references/CONCEPTS.md +27 -162
- package/skills/alloy-guides/references/CONTROLLERS.md +38 -236
- package/skills/alloy-guides/references/MODELS.md +47 -723
- package/skills/alloy-guides/references/MODELS_ADVANCED.md +21 -482
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +12 -222
- package/skills/alloy-guides/references/VIEWS_STYLES.md +39 -358
- package/skills/alloy-guides/references/VIEWS_XML.md +36 -552
- package/skills/alloy-guides/references/WIDGETS.md +49 -127
- package/skills/alloy-howtos/SKILL.md +14 -169
- package/skills/alloy-howtos/references/best_practices.md +9 -113
- package/skills/alloy-howtos/references/cli_reference.md +18 -223
- package/skills/alloy-howtos/references/config_files.md +50 -133
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +19 -63
- package/skills/alloy-howtos/references/samples.md +21 -138
- package/skills/ti-api/SKILL.md +10 -2
- package/skills/ti-api/references/api-android.md +36 -2
- package/skills/ti-api/references/api-app-platform.md +39 -3
- package/skills/ti-api/references/api-core.md +50 -18
- package/skills/ti-api/references/api-data-network.md +49 -35
- package/skills/ti-api/references/api-media.md +45 -27
- package/skills/ti-api/references/api-services.md +39 -9
- package/skills/ti-api/references/api-ui-android.md +33 -13
- package/skills/ti-api/references/api-ui-extras.md +41 -15
- package/skills/ti-api/references/api-ui-ios-animator.md +42 -26
- package/skills/ti-api/references/api-ui-ios.md +74 -2
- package/skills/ti-api/references/api-ui-lists.md +32 -16
- package/skills/ti-api/references/api-ui-text-input.md +34 -17
- package/skills/ti-api/references/api-ui-views.md +27 -1
- package/skills/ti-api/references/api-ui-windows-navigation.md +32 -18
- package/skills/ti-api/references/api-xml-global.md +66 -16
- package/skills/ti-create-release/SKILL.md +98 -0
- package/skills/ti-create-release/references/module-discovery.md +69 -0
- package/skills/ti-expert/references/adaptive-layouts.md +1 -1
- package/skills/ti-guides/SKILL.md +37 -76
- package/skills/ti-guides/references/advanced-data-and-images.md +122 -126
- package/skills/ti-guides/references/android-manifest.md +24 -83
- package/skills/ti-guides/references/app-distribution.md +31 -377
- package/skills/ti-guides/references/application-frameworks.md +127 -335
- package/skills/ti-guides/references/cli-reference.md +184 -633
- package/skills/ti-guides/references/commonjs-advanced.md +81 -231
- package/skills/ti-guides/references/compatibility-matrix.md +36 -75
- package/skills/ti-guides/references/hello-world.md +95 -70
- package/skills/ti-guides/references/hyperloop-native-access.md +52 -448
- package/skills/ti-guides/references/resources.md +174 -142
- package/skills/ti-guides/references/sdk-release-notes.md +28 -71
- package/skills/ti-guides/references/tiapp-config.md +222 -598
- package/skills/ti-howtos/SKILL.md +23 -123
- package/skills/ti-howtos/references/cross-platform-development.md +119 -324
- package/skills/ti-howtos/references/debugging-profiling.md +77 -445
- package/skills/ti-howtos/references/extending-titanium.md +199 -673
- package/skills/ti-howtos/references/local-data-sources.md +87 -300
- package/skills/ti-howtos/references/location-and-maps.md +86 -213
- package/skills/ti-howtos/references/media-apis.md +103 -223
- package/skills/ti-howtos/references/notification-services.md +86 -506
- package/skills/ti-howtos/references/remote-data-sources.md +97 -316
- package/skills/ti-howtos/references/using-modules.md +77 -133
- package/skills/ti-ui/SKILL.md +28 -143
- package/skills/ti-ui/references/icons-and-splash-screens.md +74 -403
- package/skills/ti-ui/references/layouts-and-positioning.md +175 -402
- package/skills/ti-ui/references/listviews-and-performance.md +100 -703
- package/skills/ti-ui/references/platform-conventions.md +180 -0
- package/skills/ti-ui/references/user-interface.md +43 -0
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +0 -102
- package/skills/alloy-howtos/references/custom_tags.md +0 -148
- package/skills/ti-guides/references/coding-best-practices.md +0 -149
- package/skills/ti-guides/references/javascript-primer.md +0 -414
- package/skills/ti-guides/references/reserved-words.md +0 -36
- package/skills/ti-guides/references/style-and-conventions.md +0 -103
- package/skills/ti-howtos/references/android-platform-deep-dives.md +0 -624
- package/skills/ti-howtos/references/automation-fastlane-appium.md +0 -96
- package/skills/ti-howtos/references/buffer-codec-streams.md +0 -162
- package/skills/ti-howtos/references/google-maps-v2.md +0 -172
- package/skills/ti-howtos/references/ios-map-kit.md +0 -149
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +0 -611
- package/skills/ti-howtos/references/tutorials.md +0 -565
- package/skills/ti-howtos/references/web-content-integration.md +0 -287
- package/skills/ti-howtos/references/webpack-build-pipeline.md +0 -124
- package/skills/ti-ui/references/accessibility-deep-dive.md +0 -288
- package/skills/ti-ui/references/animation-and-matrices.md +0 -569
- package/skills/ti-ui/references/application-structures.md +0 -626
- package/skills/ti-ui/references/custom-fonts-styling.md +0 -549
- package/skills/ti-ui/references/event-handling.md +0 -401
- package/skills/ti-ui/references/gestures.md +0 -448
- package/skills/ti-ui/references/orientation.md +0 -374
- package/skills/ti-ui/references/platform-ui-android.md +0 -727
- package/skills/ti-ui/references/platform-ui-ios.md +0 -576
- package/skills/ti-ui/references/scrolling-views.md +0 -288
- package/skills/ti-ui/references/tableviews.md +0 -542
|
@@ -1,279 +1,129 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Using modules
|
|
2
2
|
|
|
3
|
-
For more on CommonJS in Titanium, see the official CommonJS Modules guide in the Titanium SDK documentation.
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
Two different things get added to a Titanium project and both are called
|
|
5
|
+
dependencies.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- `exports`: a free variable within a module. Add properties to expose a public API.
|
|
10
|
-
- `module.exports`: an object you can replace to define the module's public API.
|
|
7
|
+
A **native module** wraps platform code the core SDK does not expose: Bluetooth,
|
|
8
|
+
maps, barcodes. It ships as a built binary per platform.
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
An **npm package** is JavaScript. If it runs without Node's built-ins and
|
|
11
|
+
without a browser, it will probably run here.
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
## Native modules
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
The [modules directory](https://titaniumsdk.com/modules) lists what TiDev maintains. Installing one is
|
|
16
|
+
three steps: unpack it, declare it, require it.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
> [!NOTE]
|
|
19
|
+
> There is no install command yet. `ti module` has one subcommand, `list`, so
|
|
20
|
+
> unpacking is done by hand. `ti module install` and `ti module search` are
|
|
21
|
+
> planned; until they ship, this is the path.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
Download the release archive for the module and unzip it into a `modules`
|
|
24
|
+
directory beside `tiapp.xml`. The archive already carries the right shape, so
|
|
25
|
+
unzipping it in place gives you:
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
exports.reset = () => {
|
|
31
|
-
_count = 0
|
|
32
|
-
}
|
|
27
|
+
```
|
|
28
|
+
modules/
|
|
29
|
+
android/ti.map/5.7.0/
|
|
30
|
+
iphone/ti.map/7.3.1/
|
|
33
31
|
```
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
That is `modules/<platform>/<id>/<version>/`, and the platform directory is
|
|
34
|
+
`android`, `iphone` or `commonjs` - `iphone` covers iPad and macOS too.
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
Check the CLI can see it:
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
```sh
|
|
39
|
+
ti module list
|
|
40
|
+
```
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
It reports three scopes - project, configured paths, and global - so the output
|
|
43
|
+
also tells you which copy a build will pick up.
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
Then declare it in `tiapp.xml`, per platform:
|
|
44
46
|
|
|
45
47
|
```xml
|
|
46
48
|
<modules>
|
|
47
|
-
<module
|
|
49
|
+
<module platform="android">ti.map</module>
|
|
50
|
+
<module platform="iphone">ti.map</module>
|
|
48
51
|
</modules>
|
|
49
52
|
```
|
|
50
53
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Titanium loads `ti.paypal` as a native module and will not look for a JavaScript file in Resources. If no native module matches, it falls back to JavaScript module resolution.
|
|
56
|
-
|
|
57
|
-
## 3. Module path resolution
|
|
58
|
-
|
|
59
|
-
The string passed to `require()` is treated as a path to a JavaScript file, without the `.js` extension.
|
|
60
|
-
|
|
61
|
-
Resolution rules:
|
|
62
|
-
- No prefix (`require('app/lib/myModule')`): resolved relative to the `Resources` directory (or `app/lib` in Alloy)
|
|
63
|
-
- `/` prefix (`require('/app/lib/myModule')`): also resolved relative to the `Resources` directory
|
|
64
|
-
- `./` or `../` prefix (`require('./widgets/SomeView')`): resolved relative to the current module file
|
|
65
|
-
|
|
66
|
-
Example with relative paths:
|
|
67
|
-
|
|
68
|
-
Given these files:
|
|
69
|
-
- `Resources/app/ui/SomeCustomView.js`
|
|
70
|
-
- `Resources/app/ui/widgets/SomeOtherCustomView.js`
|
|
71
|
-
- `Resources/app/lib/myModule.js`
|
|
72
|
-
|
|
73
|
-
Inside `SomeCustomView.js`:
|
|
74
|
-
```javascript
|
|
75
|
-
const myModule = require('../lib/myModule')
|
|
76
|
-
const SomeOtherCustomView = require('./widgets/SomeOtherCustomView')
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The `.js` extension is omitted in `require()` calls.
|
|
80
|
-
|
|
81
|
-
## 4. Caching behavior
|
|
82
|
-
|
|
83
|
-
Titanium caches the object returned by `require()` and returns the same reference without re-evaluating the code.
|
|
84
|
-
|
|
85
|
-
If you need code evaluated multiple times, export a function that creates what you need instead.
|
|
86
|
-
|
|
87
|
-
```javascript
|
|
88
|
-
// Good: factory pattern
|
|
89
|
-
exports.createView = (args) => {
|
|
90
|
-
return Ti.UI.createView(args)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Bad: expecting re-evaluation
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## 5. ES6+ support (SDK 7.1.0+)
|
|
97
|
-
|
|
98
|
-
Since Titanium SDK 7.1.0, you can use ES6+ module syntax. Code is transpiled to ES5 for all platforms.
|
|
99
|
-
|
|
100
|
-
```javascript
|
|
101
|
-
// MyClass.js
|
|
102
|
-
export default class MyClass {
|
|
103
|
-
constructor(name) {
|
|
104
|
-
this.name = name
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
greet() {
|
|
108
|
-
return `Hello, ${this.name}`
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Usage in controller
|
|
113
|
-
import MyClass from 'MyClass'
|
|
114
|
-
const instance = new MyClass('World')
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## 6. Module composition patterns
|
|
118
|
-
|
|
119
|
-
### Exports object pattern
|
|
54
|
+
Both steps are needed. A module on disk that `tiapp.xml` does not name is not
|
|
55
|
+
built in, and the failure is a `require` that returns nothing rather than an
|
|
56
|
+
error at build time.
|
|
120
57
|
|
|
121
|
-
|
|
122
|
-
exports.sayHello = (name) => {
|
|
123
|
-
Ti.API.info(`Hello ${name}`)
|
|
124
|
-
}
|
|
58
|
+
Then require it by id:
|
|
125
59
|
|
|
126
|
-
|
|
60
|
+
```js
|
|
61
|
+
const Map = require('ti.map');
|
|
127
62
|
```
|
|
128
63
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
```javascript
|
|
132
|
-
class Person {
|
|
133
|
-
constructor(firstName, lastName) {
|
|
134
|
-
this.firstName = firstName
|
|
135
|
-
this.lastName = lastName
|
|
136
|
-
}
|
|
64
|
+
Pin a version when more than one is unpacked and you care which one you get:
|
|
137
65
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
module.exports = Person
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Utility library pattern
|
|
147
|
-
|
|
148
|
-
```javascript
|
|
149
|
-
// app/lib/logger.js
|
|
150
|
-
exports.info = (str) => {
|
|
151
|
-
Ti.API.info(`${new Date()}: ${str}`)
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
exports.debug = (str) => {
|
|
155
|
-
Ti.API.debug(`${new Date()}: ${str}`)
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Usage:
|
|
160
|
-
```javascript
|
|
161
|
-
const logger = require('logger')
|
|
162
|
-
logger.info('some log statement with a timestamp')
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## 7. Packages of related functionality
|
|
166
|
-
|
|
167
|
-
Group related classes or helpers in a single module:
|
|
168
|
-
|
|
169
|
-
```javascript
|
|
170
|
-
// app/lib/geo.js
|
|
171
|
-
class Point {
|
|
172
|
-
constructor(x, y) {
|
|
173
|
-
this.x = x
|
|
174
|
-
this.y = y
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
class Line {
|
|
179
|
-
constructor(start, end) {
|
|
180
|
-
this.start = start
|
|
181
|
-
this.end = end
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
slope() {
|
|
185
|
-
return (this.end.y - this.start.y) / (this.end.x - this.start.x)
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
yIntercept() {
|
|
189
|
-
return this.start.y - (this.slope() * this.start.x)
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
exports.Point = Point
|
|
194
|
-
exports.Line = Line
|
|
66
|
+
```xml
|
|
67
|
+
<module platform="android" version="5.7.0">ti.map</module>
|
|
195
68
|
```
|
|
196
69
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
70
|
+
Without a version the newest installed copy wins, which means a machine with
|
|
71
|
+
two versions in `modules/` and a colleague's machine with one can produce
|
|
72
|
+
different builds from the same commit.
|
|
200
73
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
74
|
+
> [!IMPORTANT]
|
|
75
|
+
> A module is native code, so it is built for specific platforms and against a
|
|
76
|
+
> range of SDK versions. A module that has not been rebuilt for a newer Titanium
|
|
77
|
+
> SDK may fail at build time with a linker error rather than anything that names
|
|
78
|
+
> the module. Check the module's own page for the versions it supports.
|
|
206
79
|
|
|
207
|
-
|
|
80
|
+
### Where modules live
|
|
208
81
|
|
|
209
|
-
|
|
82
|
+
`modules/<platform>/<moduleid>/<version>/` in the project, which is committed
|
|
83
|
+
like any other source. Some teams keep them out of version control and install
|
|
84
|
+
in CI instead; either works, as long as the whole team does the same thing.
|
|
210
85
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
86
|
+
Unpacking into the global directory instead makes the module available to every
|
|
87
|
+
project on that machine and to nobody else's, which makes a build depend on the
|
|
88
|
+
machine it runs on. Prefer the project-local copy. On macOS the global one is
|
|
89
|
+
`~/Library/Application Support/Titanium/modules`, and `ti module list` prints
|
|
90
|
+
the full path of everything it finds.
|
|
214
91
|
|
|
215
|
-
|
|
216
|
-
_stepVal = value
|
|
217
|
-
}
|
|
92
|
+
## npm packages
|
|
218
93
|
|
|
219
|
-
|
|
220
|
-
return _stepVal
|
|
221
|
-
}
|
|
94
|
+
`package.json` in the project root, and `npm install` as normal:
|
|
222
95
|
|
|
223
|
-
|
|
96
|
+
```sh
|
|
97
|
+
npm install lodash
|
|
224
98
|
```
|
|
225
99
|
|
|
226
|
-
```
|
|
227
|
-
const
|
|
228
|
-
stateful.setPointStep(10)
|
|
229
|
-
Ti.API.info(stateful.getPointStep()) // 10 - correct, uses getter
|
|
230
|
-
Ti.API.info(stateful.stepVal) // 5 - still the original copy
|
|
100
|
+
```js
|
|
101
|
+
const _ = require('lodash');
|
|
231
102
|
```
|
|
232
103
|
|
|
233
|
-
|
|
104
|
+
Titanium bundles what is in `node_modules` at build time. There is no
|
|
105
|
+
resolution at runtime, so a package pulled in dynamically by name computed at
|
|
106
|
+
runtime will not be there.
|
|
234
107
|
|
|
235
|
-
|
|
108
|
+
**Check runtime dependencies:** Titanium is not a full Node.js or browser runtime. Some Node-compatible shims (`fs`, `path`, `os`, `buffer`, `events`, `process`) exist in the released API; verify the exact supported subset. Packages requiring unavailable Node APIs such as `child_process`, a DOM or Node native bindings do not work unchanged. A package that only touches `Ti.*` and plain JavaScript is fine.
|
|
109
|
+
Check before adopting a large dependency; the failure arrives at runtime as an
|
|
110
|
+
undefined require.
|
|
236
111
|
|
|
237
|
-
|
|
112
|
+
Keep `node_modules` out of version control as you would anywhere else.
|
|
238
113
|
|
|
239
|
-
|
|
240
|
-
// Wrong
|
|
241
|
-
function Person() {}
|
|
242
|
-
exports = Person
|
|
114
|
+
## Which one do I need
|
|
243
115
|
|
|
244
|
-
|
|
245
|
-
module.
|
|
246
|
-
|
|
116
|
+
If it talks to hardware, the operating system, or a platform SDK, it is a
|
|
117
|
+
native module and somebody has to have written it. If it is an algorithm, a
|
|
118
|
+
parser, or a client for an HTTP API, it is probably an npm package.
|
|
247
119
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
```javascript
|
|
251
|
-
// Discouraged
|
|
252
|
-
module.exports = Person
|
|
253
|
-
exports.foo = 'bar'
|
|
254
|
-
|
|
255
|
-
// Use one consistently
|
|
256
|
-
```
|
|
120
|
+
If neither exists, writing a native module is covered under Extending Titanium.
|
|
257
121
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
Any data a module needs should be passed during construction or initialization. Avoid globals shared across modules.
|
|
261
|
-
|
|
262
|
-
## 10. Security and scope
|
|
263
|
-
|
|
264
|
-
All modules have private scope. Variables declared within the module are private unless added to `exports`.
|
|
265
|
-
|
|
266
|
-
```javascript
|
|
267
|
-
const _privateVar = 'secret' // Not accessible outside
|
|
268
|
-
|
|
269
|
-
exports.publicMethod = () => {
|
|
270
|
-
// Can access _privateVar
|
|
271
|
-
return _privateVar
|
|
272
|
-
}
|
|
273
|
-
```
|
|
122
|
+
## Next
|
|
274
123
|
|
|
275
|
-
|
|
124
|
+
[Debugging and profiling](https://titaniumsdk.com/docs/build/debugging) covers finding out why the
|
|
125
|
+
thing you just added is not working.
|
|
276
126
|
|
|
277
|
-
|
|
127
|
+
## Application CommonJS paths
|
|
278
128
|
|
|
279
|
-
|
|
129
|
+
Classic `Resources/myModule.js` and Alloy `app/lib/myModule.js` are required as `require('myModule')`; the Alloy source prefix `app/lib/` is not a runtime module prefix. Use literal native requires by ID and declare the module first. Check the selected SDK's versioned API for Node-compatible shims rather than assuming full Node behavior.
|
|
@@ -1,89 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Titanium compatibility matrix
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Released baseline: SDK 13.4.1.GA
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
These are the declared ranges for **13.4.1.GA**, not promises about every future release. Check the [rendered compatibility tables](https://titaniumsdk.com/docs/reference/compatibility.md) and the [versioned API](https://titaniumsdk.com/docs/sdk/13.4.1) for another SDK. Raw website Markdown contains generated-table directives; read the rendered page to obtain the actual rows. Unreleased SDK 14 requirements are outside this baseline.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
| Component | SDK 13.4.1 declaration |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Node.js used by SDK | >=20.18.1 |
|
|
10
|
+
| Titanium CLI | >=8.0.0 |
|
|
11
|
+
| JDK | >=17.x |
|
|
12
|
+
| Android SDK platforms | 23.x through 36.x |
|
|
13
|
+
| Android Build Tools | 30.0.2 through 35.x |
|
|
14
|
+
| Android Platform Tools | 33.x |
|
|
15
|
+
| Android SDK Tools | <=35.x |
|
|
16
|
+
| Android NDK, for native compilation | r21 through r22b |
|
|
17
|
+
| Xcode | 15.0 through 26.x |
|
|
18
|
+
| iOS SDK | 17.0 through 26.x |
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
- [2. Java Development Kit](#2-java-development-kit)
|
|
12
|
-
- [3. Node.js](#3-nodejs)
|
|
13
|
-
- [4. Android](#4-android)
|
|
14
|
-
- [5. iOS and Xcode](#5-ios-and-xcode)
|
|
15
|
-
- [6. Which platform can build what](#6-which-platform-can-build-what)
|
|
20
|
+
A platform that can be detected is not necessarily the runtime floor or the default compile target. For 13.4.1 the Android minimum runtime is API 24, default compile/target is API 36, iOS minimum runtime is 15.0, and watchOS minimum is 8.0. Setting a lower `min-ios-ver` does not lower the SDK floor. Module compatibility is separate: check each native module's supported SDK, architecture and platform versions.
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
## SDK and CLI requirements differ
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
The current CLI 9.1.0 requires Node >=22.19.0 even though SDK 13.4.1 declares >=20.18.1. Use Node 22.19+ in the 22 line or Node 24 with that pairing. SDK 13.4.1's `ioslib`/`node-ios-device` dependencies provide prebuilt bindings through Node 24; Node 26 can fail while rebuilding/loading them. Do not infer unrestricted practical compatibility from a lower-bound-only SDK declaration. Use Node 24 for this released baseline rather than adopting SDK 14 instructions before GA.
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
|---|---|
|
|
23
|
-
| macOS | 10.11.5 and later |
|
|
24
|
-
| Windows | Windows 7 and later (Android) |
|
|
25
|
-
| Linux | Tested on Fedora and (K)Ubuntu; others should work |
|
|
26
|
+
JDK source/target bytecode settings such as `android.javac.source` do not identify the JDK that runs Gradle. Check `javac -version`, `JAVA_HOME` and `ti info` independently.
|
|
26
27
|
|
|
27
|
-
##
|
|
28
|
+
## Host platforms and native tooling
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
| Host | Android | iOS and Mac Catalyst |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| macOS | Yes | Yes, through Xcode |
|
|
33
|
+
| Windows | Yes | No |
|
|
34
|
+
| Linux | Yes | No |
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
|---|---|---|
|
|
33
|
-
| 13.3.0 - latest | 18 | 25 |
|
|
34
|
-
| 12.8.0 - 13.2.0 | 18 | 21 |
|
|
36
|
+
The host OS must also support the installed Node, JDK, Android tools and Xcode; old archive claims such as Windows 7 or macOS 10.11 are not current installation advice. On macOS open Xcode once, finish its installation, and select the intended copy with `sudo xcode-select -s /Applications/Xcode.app`.
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
Components newer than the SDK's tested range can produce warnings while builds continue; a warning alone does not establish either failure or support. Diagnose a failing build with the tested version first. Pin Android Build Tools with `ti config android.buildTools.selectedVersion 35.0.0` when needed. NDK warnings are irrelevant to ordinary app builds that do not compile native code.
|
|
37
39
|
|
|
38
|
-
##
|
|
40
|
+
## Verify the selected environment
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
```sh
|
|
43
|
+
node -v
|
|
44
|
+
javac -version
|
|
45
|
+
ti -v
|
|
46
|
+
ti sdk list
|
|
47
|
+
ti info
|
|
48
|
+
```
|
|
41
49
|
|
|
42
|
-
|
|
43
|
-
|---|---|---|
|
|
44
|
-
| 13.1.1 - latest | 20.x | 24.x |
|
|
45
|
-
| 13.0.0 - 13.1.0 | 20.x | 22.x |
|
|
46
|
-
| 12.6.0 - 12.8.0 | 18.x | 22.x |
|
|
47
|
-
|
|
48
|
-
## 4. Android
|
|
49
|
-
|
|
50
|
-
As of Titanium 9.0.0 the build system downloads the needed Android SDK platforms and tools automatically. Upgrade those packages only between major projects — changes there have broken the Titanium toolchain several times.
|
|
51
|
-
|
|
52
|
-
| Titanium SDK version | Min target (`android:targetSdkVersion`) | Max target | Min supported (`android:minSdkVersion`) |
|
|
53
|
-
|---|---|---|---|
|
|
54
|
-
| 13.1.0+ | 15.x (API 35) | 15.x (API 35) | 7.x (API 24) |
|
|
55
|
-
| 12.8.0 - 13.0.1 | 15.x (API 35) | 15.x (API 35) | 5.x (API 21) |
|
|
56
|
-
| 12.5.0 - 12.8.0 | 14.x (API 34) | 14.x (API 34) | 5.x (API 21) |
|
|
57
|
-
| 12.0.0 - 12.5.0 | 13.x (API 33) | 13.x (API 33) | 5.x (API 21) |
|
|
58
|
-
|
|
59
|
-
A `android:targetSDKVersion` set in `tiapp.xml` must fall inside the min/max target range of the SDK in use.
|
|
60
|
-
|
|
61
|
-
> **Note:** Titanium SDK 13.4.0 is described in its release note as *preparing the SDK for Android target SDK 36*. The matrix above still lists API 35 as the maximum; treat API 36 as in-progress rather than as a supported target until the matrix says otherwise.
|
|
62
|
-
|
|
63
|
-
Developing native Android add-on modules on macOS also requires the Xcode command line tools.
|
|
64
|
-
|
|
65
|
-
## 5. iOS and Xcode
|
|
66
|
-
|
|
67
|
-
Building for iOS requires macOS — Apple's license agreement allows iOS development only on Apple hardware.
|
|
68
|
-
|
|
69
|
-
| Titanium SDK version | Min Xcode | Max Xcode | Notes |
|
|
70
|
-
|---|---|---|---|
|
|
71
|
-
| 12.6.3 - latest | 12.0.0 | 16.x | Full support for iOS 18.4 |
|
|
72
|
-
| 12.2.0 - 12.6.2 | 12.0.0 | 16.2 | Full support for iOS 17 |
|
|
73
|
-
| 10.1.0 - 12.1.2 | 11.0.0 | 13.x | Full support for iOS 15 |
|
|
74
|
-
|
|
75
|
-
| Titanium SDK version | Min iOS SDK | Max iOS SDK | Min target iOS | Max target iOS |
|
|
76
|
-
|---|---|---|---|---|
|
|
77
|
-
| 12.2.0 - latest | 13.0.0 | 17.x | 12.0 | 17.x |
|
|
78
|
-
| 10.1.0 - 12.1.2 | 13.0.0 | 15.x | 12.0 | 15.x |
|
|
79
|
-
|
|
80
|
-
> **Note:** these two tables lag behind the release notes. Titanium SDK 13.3.0 shipped *support for Xcode 27 and iOS 27*, which no row above reflects. Where they disagree, the release note is the newer statement — see [sdk-release-notes.md](sdk-release-notes.md).
|
|
81
|
-
|
|
82
|
-
## 6. Which platform can build what
|
|
83
|
-
|
|
84
|
-
| Target | macOS | Windows | Linux |
|
|
85
|
-
|---|---|---|---|
|
|
86
|
-
| Android | Yes | Yes | Yes |
|
|
87
|
-
| iOS | Yes | No | No |
|
|
88
|
-
|
|
89
|
-
Anything marked *pre-release* upstream — Beta, Developer Preview, Release Candidate, and continuous builds — is not officially supported.
|
|
50
|
+
Use `ti info -t ios` or `ti info -t android` to narrow detection. Pin `<sdk-version>13.4.1.GA</sdk-version>` in `tiapp.xml` for reproducible builds; an explicit `--sdk` overrides it for one invocation. Development snapshots and release candidates are for testing, not a replacement for a supported GA production baseline.
|