@maccesar/titools 2.2.3 → 2.2.8
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/README.md +28 -27
- package/lib/commands/update.js +80 -101
- package/package.json +1 -1
- package/skills/alloy-guides/SKILL.md +31 -31
- package/skills/alloy-guides/references/CONCEPTS.md +3 -3
- package/skills/alloy-guides/references/CONTROLLERS.md +1 -1
- package/skills/alloy-guides/references/MODELS.md +6 -6
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +1 -1
- package/skills/alloy-guides/references/VIEWS_XML.md +1 -1
- package/skills/alloy-guides/references/WIDGETS.md +1 -1
- package/skills/alloy-howtos/SKILL.md +27 -27
- package/skills/alloy-howtos/references/best_practices.md +9 -9
- package/skills/alloy-howtos/references/cli_reference.md +14 -14
- package/skills/alloy-howtos/references/config_files.md +16 -16
- package/skills/alloy-howtos/references/custom_tags.md +16 -16
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +11 -15
- package/skills/alloy-howtos/references/samples.md +19 -19
- package/skills/purgetss/SKILL.md +11 -1
- package/skills/purgetss/references/animation-system.md +1 -1
- package/skills/purgetss/references/cli-commands.md +3 -3
- package/skills/purgetss/references/customization-deep-dive.md +1 -1
- package/skills/purgetss/references/dynamic-component-creation.md +1 -1
- package/skills/purgetss/references/icon-fonts.md +4 -0
- package/skills/purgetss/references/installation-setup.md +8 -1
- package/skills/purgetss/references/migration-guide.md +4 -0
- package/skills/purgetss/references/tikit-components.md +193 -204
- package/skills/purgetss/references/ui-ux-design.md +1 -1
- package/skills/ti-expert/SKILL.md +78 -118
- package/skills/ti-expert/references/alloy-builtins.md +18 -18
- package/skills/ti-expert/references/alloy-structure.md +21 -21
- package/skills/ti-expert/references/anti-patterns.md +15 -15
- package/skills/ti-expert/references/cli-expert.md +15 -15
- package/skills/ti-expert/references/code-conventions.md +38 -38
- package/skills/ti-expert/references/contracts.md +8 -8
- package/skills/ti-expert/references/controller-patterns.md +14 -14
- package/skills/ti-expert/references/error-handling.md +11 -11
- package/skills/ti-expert/references/examples.md +12 -12
- package/skills/ti-expert/references/migration-patterns.md +24 -24
- package/skills/ti-expert/references/patterns.md +10 -10
- package/skills/ti-expert/references/performance-listview.md +16 -16
- package/skills/ti-expert/references/performance-optimization.md +41 -41
- package/skills/ti-expert/references/security-device.md +22 -22
- package/skills/ti-expert/references/security-fundamentals.md +19 -19
- package/skills/ti-expert/references/state-management.md +33 -33
- package/skills/ti-expert/references/testing-e2e-ci.md +25 -25
- package/skills/ti-expert/references/testing-unit.md +24 -24
- package/skills/ti-expert/references/theming.md +15 -15
- package/skills/ti-guides/SKILL.md +58 -60
- package/skills/ti-guides/references/advanced-data-and-images.md +33 -33
- package/skills/ti-guides/references/android-manifest.md +15 -15
- package/skills/ti-guides/references/app-distribution.md +70 -166
- package/skills/ti-guides/references/application-frameworks.md +96 -114
- package/skills/ti-guides/references/cli-reference.md +294 -294
- package/skills/ti-guides/references/coding-best-practices.md +42 -33
- package/skills/ti-guides/references/commonjs-advanced.md +57 -51
- package/skills/ti-guides/references/hello-world.md +36 -36
- package/skills/ti-guides/references/hyperloop-native-access.md +66 -66
- package/skills/ti-guides/references/javascript-primer.md +83 -101
- package/skills/ti-guides/references/reserved-words.md +9 -9
- package/skills/ti-guides/references/resources.md +75 -83
- package/skills/ti-guides/references/style-and-conventions.md +35 -28
- package/skills/ti-guides/references/tiapp-config.md +110 -74
- package/skills/ti-howtos/SKILL.md +88 -92
- package/skills/ti-howtos/references/android-platform-deep-dives.md +104 -104
- package/skills/ti-howtos/references/automation-fastlane-appium.md +39 -39
- package/skills/ti-howtos/references/buffer-codec-streams.md +60 -60
- package/skills/ti-howtos/references/cross-platform-development.md +115 -136
- package/skills/ti-howtos/references/debugging-profiling.md +167 -181
- package/skills/ti-howtos/references/extending-titanium.md +121 -121
- package/skills/ti-howtos/references/google-maps-v2.md +84 -82
- package/skills/ti-howtos/references/ios-map-kit.md +65 -60
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +123 -123
- package/skills/ti-howtos/references/local-data-sources.md +79 -78
- package/skills/ti-howtos/references/location-and-maps.md +116 -120
- package/skills/ti-howtos/references/media-apis.md +87 -86
- package/skills/ti-howtos/references/notification-services.md +250 -260
- package/skills/ti-howtos/references/remote-data-sources.md +98 -93
- package/skills/ti-howtos/references/tutorials.md +226 -216
- package/skills/ti-howtos/references/using-modules.md +73 -102
- package/skills/ti-howtos/references/web-content-integration.md +101 -103
- package/skills/ti-howtos/references/webpack-build-pipeline.md +52 -44
- package/skills/ti-ui/SKILL.md +85 -85
- package/skills/ti-ui/references/accessibility-deep-dive.md +57 -57
- package/skills/ti-ui/references/animation-and-matrices.md +79 -79
- package/skills/ti-ui/references/application-structures.md +96 -99
- package/skills/ti-ui/references/custom-fonts-styling.md +99 -99
- package/skills/ti-ui/references/event-handling.md +58 -58
- package/skills/ti-ui/references/gestures.md +62 -64
- package/skills/ti-ui/references/icons-and-splash-screens.md +88 -88
- package/skills/ti-ui/references/layouts-and-positioning.md +87 -97
- package/skills/ti-ui/references/listviews-and-performance.md +107 -107
- package/skills/ti-ui/references/orientation.md +87 -88
- package/skills/ti-ui/references/platform-ui-android.md +87 -81
- package/skills/ti-ui/references/platform-ui-ios.md +63 -61
- package/skills/ti-ui/references/scrolling-views.md +29 -29
- package/skills/ti-ui/references/tableviews.md +56 -56
|
@@ -5,145 +5,141 @@ argument-hint: "[feature]"
|
|
|
5
5
|
allowed-tools: Read, Grep, Glob, Edit, Write, Bash, Bash(node *)
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Titanium SDK
|
|
8
|
+
# Titanium SDK how-tos
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Hands-on guide to Titanium SDK native integrations. Focuses on practical steps, platform differences, and the details that usually bite.
|
|
11
11
|
|
|
12
|
-
## Project
|
|
12
|
+
## Project detection
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
This skill
|
|
14
|
+
::::info Auto-detects Titanium projects
|
|
15
|
+
This skill detects Titanium projects automatically.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Indicators:
|
|
18
|
+
- `tiapp.xml` exists (definitive)
|
|
19
|
+
- Alloy project: `app/` folder
|
|
20
|
+
- Classic project: `Resources/` folder
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
-
|
|
22
|
+
Behavior:
|
|
23
|
+
- Titanium detected: provide native integration guidance, permissions, modules, and platform notes
|
|
24
|
+
- Not detected: say this skill is for Titanium projects only
|
|
25
|
+
::::
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
- **Alloy projects** (app/ folder)
|
|
24
|
-
- **Classic projects** (Resources/ folder)
|
|
27
|
+
## Integration workflow
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
1. Requirement check: permissions, `tiapp.xml`, and module dependencies.
|
|
30
|
+
2. Service setup: listeners and services (Location, Push, Core Motion, and so on).
|
|
31
|
+
3. Lifecycle sync: tie listeners to Android and iOS lifecycle events.
|
|
32
|
+
4. Error handling: use robust callbacks for async native calls.
|
|
33
|
+
5. Platform optimization: apply platform-specific logic (Intent filters, Spotlight, Core Motion).
|
|
30
34
|
|
|
31
|
-
##
|
|
35
|
+
## Native integration rules
|
|
32
36
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
### iOS permissions
|
|
38
|
+
- Location: `NSLocationWhenInUseUsageDescription` or `NSLocationAlwaysAndWhenInUseUsageDescription` in `tiapp.xml`.
|
|
39
|
+
- Motion activity: required for Core Motion Activity API.
|
|
40
|
+
- Camera and photo: `NSCameraUsageDescription` and `NSPhotoLibraryUsageDescription`.
|
|
41
|
+
- Background modes: required for background audio, location, or VOIP.
|
|
42
|
+
- iOS 17+: add `PrivacyInfo.xcprivacy` for UserDefaults and File Timestamps.
|
|
38
43
|
|
|
39
|
-
|
|
44
|
+
### Android resource management
|
|
45
|
+
- Services: stop background services when they are no longer needed.
|
|
46
|
+
- Location: use `distanceFilter` and FusedLocationProvider (requires `ti.playservices`).
|
|
47
|
+
- Intents: set action, data type, and category. Copy the root activity to `tiapp.xml` for intent filters.
|
|
40
48
|
|
|
41
|
-
###
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
49
|
+
### Data and networking
|
|
50
|
+
- HTTPClient: handle both `onload` and `onerror`.
|
|
51
|
+
- SQLite: close both `db` and `resultSet` to avoid locks.
|
|
52
|
+
- Filesystem: check `isExternalStoragePresent()` before using SD card storage.
|
|
53
|
+
- Binary data: use `Ti.Buffer` and `Ti.Codec` for byte-level work.
|
|
54
|
+
- Streams: use `BufferStream`, `FileStream`, or `BlobStream` for chunked I/O.
|
|
47
55
|
|
|
48
|
-
###
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
56
|
+
### Media and memory
|
|
57
|
+
- Camera and gallery: use `imageAsResized` to reduce memory pressure.
|
|
58
|
+
- Audio: handle `pause` and `resume` for streaming interruptions.
|
|
59
|
+
- WebView: avoid TableView embedding; set `touchEnabled=false` if needed.
|
|
60
|
+
- Video: Android requires fullscreen; iOS supports embedded players.
|
|
52
61
|
|
|
53
|
-
###
|
|
54
|
-
- **HTTPClient**: Always handle both `onload` and `onerror` callbacks
|
|
55
|
-
- **SQLite**: Always `db.close()` and `resultSet.close()` to prevent locks
|
|
56
|
-
- **Filesystem**: Check `isExternalStoragePresent()` before accessing SD card
|
|
57
|
-
- **Binary Data**: Use `Ti.Buffer` and `Ti.Codec` for low-level byte manipulation
|
|
58
|
-
- **Streams**: Use `BufferStream`, `FileStream` or `BlobStream` for efficient chunk-based I/O.
|
|
62
|
+
### Platform-specific properties
|
|
59
63
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- **Audio**: Handle `pause`/`resume` events for streaming interruption
|
|
63
|
-
- **WebView**: Avoid embedding in TableViews; set `touchEnabled=false` if needed
|
|
64
|
-
- **Video**: Android requires fullscreen; iOS supports embedded players
|
|
64
|
+
::::danger Platform-specific properties need modifiers
|
|
65
|
+
Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` without platform modifiers can break cross-platform builds.
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
:::danger CRITICAL: Platform-Specific Properties Require Modifiers
|
|
69
|
-
Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` properties WITHOUT platform modifiers causes cross-platform compilation failures.
|
|
70
|
-
|
|
71
|
-
**Example of the damage:**
|
|
67
|
+
Bad example:
|
|
72
68
|
```javascript
|
|
73
|
-
//
|
|
69
|
+
// Wrong: adds Ti.UI.iOS to Android build
|
|
74
70
|
const win = Ti.UI.createWindow({
|
|
75
|
-
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
76
|
-
})
|
|
71
|
+
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
72
|
+
});
|
|
77
73
|
```
|
|
78
74
|
|
|
79
|
-
|
|
75
|
+
Good options:
|
|
80
76
|
|
|
81
|
-
|
|
77
|
+
TSS modifier (Alloy):
|
|
82
78
|
```tss
|
|
83
79
|
"#mainWindow[platform=ios]": {
|
|
84
80
|
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
85
81
|
}
|
|
86
82
|
```
|
|
87
83
|
|
|
88
|
-
|
|
84
|
+
Conditional code:
|
|
89
85
|
```javascript
|
|
90
86
|
if (OS_IOS) {
|
|
91
|
-
$.mainWindow.statusBarStyle = Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
87
|
+
$.mainWindow.statusBarStyle = Ti.UI.iOS.StatusBar.LIGHT_CONTENT;
|
|
92
88
|
}
|
|
93
89
|
```
|
|
94
90
|
|
|
95
|
-
|
|
96
|
-
- iOS: `statusBarStyle`, `modalStyle`, `modalTransitionStyle`, any `Ti.UI.iOS
|
|
97
|
-
- Android: `actionBar` config, any `Ti.UI.Android.*` constant
|
|
91
|
+
Always require modifiers:
|
|
92
|
+
- iOS: `statusBarStyle`, `modalStyle`, `modalTransitionStyle`, any `Ti.UI.iOS.*`.
|
|
93
|
+
- Android: `actionBar` config, any `Ti.UI.Android.*` constant.
|
|
98
94
|
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
For TSS platform modifiers, see the code conventions in `skills/ti-expert/references/code-conventions.md#platform--device-modifiers` or the platform UI guides in `references/ios-platform-deep-dives.md`.
|
|
96
|
+
::::
|
|
101
97
|
|
|
102
|
-
## Reference
|
|
98
|
+
## Reference guides
|
|
103
99
|
|
|
104
|
-
### Core
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
100
|
+
### Core features
|
|
101
|
+
- [Location and maps](references/location-and-maps.md): GPS tracking and battery-efficient location rules.
|
|
102
|
+
- [Google Maps v2 (Android)](references/google-maps-v2.md): API keys, Google Play Services, and v2 features.
|
|
103
|
+
- [iOS Map Kit](references/ios-map-kit.md): 3D camera, system buttons, and iOS callouts.
|
|
104
|
+
- [Notification services](references/notification-services.md): push notifications (APNs/FCM), local alerts, interactive notifications.
|
|
109
105
|
|
|
110
|
-
### Data
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
|
|
106
|
+
### Data handling
|
|
107
|
+
- [Remote data sources](references/remote-data-sources.md): HTTPClient lifecycle, JSON/XML parsing, uploads, downloads, sockets, SOAP, SSL.
|
|
108
|
+
- [Local data sources](references/local-data-sources.md): filesystem operations, SQLite, Properties API, persistence strategy.
|
|
109
|
+
- [Buffer, Codec, and Streams](references/buffer-codec-streams.md): binary data manipulation and serial data flows.
|
|
114
110
|
|
|
115
|
-
### Media
|
|
116
|
-
-
|
|
111
|
+
### Media and content
|
|
112
|
+
- [Media APIs](references/media-apis.md): audio playback and recording, video streaming, camera and gallery, ImageViews, density assets.
|
|
117
113
|
|
|
118
|
-
### Web
|
|
119
|
-
-
|
|
120
|
-
-
|
|
114
|
+
### Web integration
|
|
115
|
+
- [Web content integration](references/web-content-integration.md): WebView (WKWebView), local and remote content, bidirectional communication.
|
|
116
|
+
- [Webpack build pipeline](references/webpack-build-pipeline.md): Ti 9.1.0+ build pipeline, npm integration, and the `@` alias.
|
|
121
117
|
|
|
122
|
-
### Platform-
|
|
123
|
-
-
|
|
118
|
+
### Platform-specific (Android)
|
|
119
|
+
- [Android platform deep dives](references/android-platform-deep-dives.md): intents, intent filters, broadcast permissions, background services.
|
|
124
120
|
|
|
125
|
-
### Platform-
|
|
126
|
-
-
|
|
121
|
+
### Platform-specific (iOS)
|
|
122
|
+
- [iOS platform deep dives](references/ios-platform-deep-dives.md): iOS 17 privacy, silent push, Spotlight, Handoff, iCloud, Core Motion, WatchKit and Siri.
|
|
127
123
|
|
|
128
|
-
### Advanced
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
|
|
124
|
+
### Advanced and DevOps
|
|
125
|
+
- [Extending Titanium](references/extending-titanium.md): Hyperloop, native modules (Proxy and View), Xcode debugging, AndroidX migration for SDK 9.0.
|
|
126
|
+
- [Debugging and profiling](references/debugging-profiling.md): memory management, leak detection, native tools.
|
|
127
|
+
- [Automation (Fastlane and Appium)](references/automation-fastlane-appium.md): CI/CD, UI testing, store deployment.
|
|
132
128
|
|
|
133
|
-
## Related
|
|
129
|
+
## Related skills
|
|
134
130
|
|
|
135
|
-
For tasks beyond native feature integration, use
|
|
131
|
+
For tasks beyond native feature integration, use:
|
|
136
132
|
|
|
137
|
-
| Task | Use
|
|
133
|
+
| Task | Use this skill |
|
|
138
134
|
| ---------------------------------------------- | -------------- |
|
|
139
135
|
| Project architecture, services, memory cleanup | `ti-expert` |
|
|
140
136
|
| UI layouts, ListViews, gestures, animations | `ti-ui` |
|
|
141
137
|
| Hyperloop, app distribution, tiapp.xml config | `ti-guides` |
|
|
142
138
|
| Alloy MVC, models, data binding | `alloy-guides` |
|
|
143
139
|
|
|
144
|
-
## Response
|
|
140
|
+
## Response format
|
|
145
141
|
|
|
146
|
-
1.
|
|
147
|
-
2.
|
|
148
|
-
3.
|
|
149
|
-
4.
|
|
142
|
+
1. Prerequisites: required permissions, `tiapp.xml` config, or modules.
|
|
143
|
+
2. Step-by-step implementation: task-focused code guide with error handling.
|
|
144
|
+
3. Platform caveats: iOS and Android differences.
|
|
145
|
+
4. Best practices: memory, lifecycle, and performance tips.
|