@maccesar/titools 3.2.0 → 4.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/README.md +27 -61
- package/lib/cleanup.js +29 -0
- package/lib/commands/agents.js +8 -7
- package/lib/commands/skills.js +118 -23
- package/lib/config.js +13 -15
- package/lib/installer.js +5 -3
- package/lib/utils.js +36 -0
- package/package.json +1 -1
- package/skills/alloy-guides/SKILL.md +188 -0
- package/skills/alloy-guides/references/CLI_TASKS.md +233 -0
- package/skills/alloy-guides/references/CONCEPTS.md +171 -0
- package/skills/alloy-guides/references/CONTROLLERS.md +279 -0
- package/skills/alloy-guides/references/MODELS.md +742 -0
- package/skills/alloy-guides/references/MODELS_ADVANCED.md +482 -0
- package/skills/alloy-guides/references/PURGETSS.md +57 -0
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +235 -0
- package/skills/alloy-guides/references/VIEWS_STYLES.md +375 -0
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +102 -0
- package/skills/alloy-guides/references/VIEWS_XML.md +581 -0
- package/skills/alloy-guides/references/WIDGETS.md +160 -0
- package/skills/alloy-howtos/SKILL.md +179 -0
- package/skills/alloy-howtos/references/best_practices.md +121 -0
- package/skills/alloy-howtos/references/cli_reference.md +230 -0
- package/skills/alloy-howtos/references/config_files.md +158 -0
- package/skills/alloy-howtos/references/custom_tags.md +148 -0
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +78 -0
- package/skills/alloy-howtos/references/samples.md +156 -0
- package/skills/purgetss/SKILL.md +184 -181
- package/skills/purgetss/references/EXAMPLES.md +8 -6
- package/skills/purgetss/references/app-branding.md +5 -0
- package/skills/purgetss/references/apply-directive.md +1 -1
- package/skills/purgetss/references/class-categories.md +1 -1
- package/skills/purgetss/references/class-index-properties.md +618 -0
- package/skills/purgetss/references/class-index.md +4 -610
- package/skills/purgetss/references/cli-commands.md +41 -410
- package/skills/purgetss/references/custom-fonts.md +292 -0
- package/skills/purgetss/references/custom-rules.md +1 -1
- package/skills/purgetss/references/customization-deep-dive.md +64 -1
- package/skills/purgetss/references/icon-fonts.md +208 -118
- package/skills/purgetss/references/installation-setup.md +4 -4
- package/skills/purgetss/references/migration-guide.md +53 -1
- package/skills/purgetss/references/multi-density-images.md +53 -2
- package/skills/purgetss/references/svg-pipeline.md +249 -0
- package/skills/purgetss/references/tikit-components.md +2 -2
- package/skills/purgetss/references/titanium-resets.md +2 -2
- package/skills/purgetss/references/ui-ux-design.md +7 -5
- package/skills/purgetss/references/version-history.md +71 -82
- package/skills/ti-api/SKILL.md +128 -0
- package/skills/ti-api/references/api-android.md +675 -0
- package/skills/ti-api/references/api-app-platform.md +636 -0
- package/skills/ti-api/references/api-core.md +764 -0
- package/skills/ti-api/references/api-data-network.md +641 -0
- package/skills/ti-api/references/api-media.md +655 -0
- package/skills/ti-api/references/api-modules-ble-bluetooth.md +657 -0
- package/skills/ti-api/references/api-modules-coremotion-urlsession.md +411 -0
- package/skills/ti-api/references/api-modules-map.md +632 -0
- package/skills/ti-api/references/api-modules-nfc.md +725 -0
- package/skills/ti-api/references/api-modules-social-misc.md +526 -0
- package/skills/ti-api/references/api-services.md +700 -0
- package/skills/ti-api/references/api-ui-android.md +499 -0
- package/skills/ti-api/references/api-ui-extras.md +702 -0
- package/skills/ti-api/references/api-ui-ios-animator.md +378 -0
- package/skills/ti-api/references/api-ui-ios.md +756 -0
- package/skills/ti-api/references/api-ui-lists.md +581 -0
- package/skills/ti-api/references/api-ui-text-input.md +607 -0
- package/skills/ti-api/references/api-ui-views.md +572 -0
- package/skills/ti-api/references/api-ui-windows-navigation.md +676 -0
- package/skills/ti-api/references/api-xml-global.md +743 -0
- package/skills/ti-guides/SKILL.md +82 -0
- package/skills/ti-guides/references/advanced-data-and-images.md +155 -0
- package/skills/ti-guides/references/android-manifest.md +97 -0
- package/skills/ti-guides/references/app-distribution.md +373 -0
- package/skills/ti-guides/references/application-frameworks.md +366 -0
- package/skills/ti-guides/references/cli-reference.md +700 -0
- package/skills/ti-guides/references/coding-best-practices.md +150 -0
- package/skills/ti-guides/references/commonjs-advanced.md +279 -0
- package/skills/ti-guides/references/hello-world.md +99 -0
- package/skills/ti-guides/references/hyperloop-native-access.md +458 -0
- package/skills/ti-guides/references/javascript-primer.md +402 -0
- package/skills/ti-guides/references/reserved-words.md +36 -0
- package/skills/ti-guides/references/resources.md +172 -0
- package/skills/ti-guides/references/style-and-conventions.md +104 -0
- package/skills/ti-guides/references/tiapp-config.md +655 -0
- package/skills/ti-howtos/SKILL.md +131 -0
- package/skills/ti-howtos/references/android-platform-deep-dives.md +609 -0
- package/skills/ti-howtos/references/automation-fastlane-appium.md +96 -0
- package/skills/ti-howtos/references/buffer-codec-streams.md +162 -0
- package/skills/ti-howtos/references/cross-platform-development.md +358 -0
- package/skills/ti-howtos/references/debugging-profiling.md +473 -0
- package/skills/ti-howtos/references/extending-titanium.md +684 -0
- package/skills/ti-howtos/references/google-maps-v2.md +172 -0
- package/skills/ti-howtos/references/ios-map-kit.md +149 -0
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +595 -0
- package/skills/ti-howtos/references/local-data-sources.md +310 -0
- package/skills/ti-howtos/references/location-and-maps.md +267 -0
- package/skills/ti-howtos/references/media-apis.md +268 -0
- package/skills/ti-howtos/references/notification-services.md +539 -0
- package/skills/ti-howtos/references/remote-data-sources.md +339 -0
- package/skills/ti-howtos/references/tutorials.md +552 -0
- package/skills/ti-howtos/references/using-modules.md +182 -0
- package/skills/ti-howtos/references/web-content-integration.md +288 -0
- package/skills/ti-howtos/references/webpack-build-pipeline.md +125 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ti-howtos
|
|
3
|
+
description: 'Use when implementing Titanium SDK native integrations: location services, Google Maps v2 (Android) or Map Kit (iOS), push notifications (APNs/FCM), camera and gallery, media APIs, SQLite databases, HTTPClient networking, WKWebView, Android Intents, iOS Keychain/iCloud, WatchKit/Siri, Hyperloop native modules, or CI/CD with Fastlane and Appium. Triggers include `tiapp.xml` in the project root plus calls to `Ti.Geolocation`, `Ti.Media`, `Ti.Database`, `Ti.Network.HTTPClient`, `Ti.UI.WebView`, `Ti.Filesystem`, or third-party modules like `ti.map`, `ti.playservices`, `ti.identity`.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ti-howtos
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Practical reference for Titanium SDK native integrations: device APIs, networking, persistence, native modules, platform-specific deep dives, and CI/CD. Reference-style — load the relevant file from `references/` for deeper detail.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
Use this skill when:
|
|
15
|
+
|
|
16
|
+
- The project contains `tiapp.xml`
|
|
17
|
+
- Implementing device features: GPS, camera, push notifications, sensors
|
|
18
|
+
- Adding maps: Google Maps v2 on Android or Map Kit on iOS
|
|
19
|
+
- Working with media: audio, video, image gallery, density assets
|
|
20
|
+
- Persisting data: SQLite, Properties, Filesystem, encrypted storage
|
|
21
|
+
- Networking: HTTPClient, sockets, SOAP, SSL/TLS, file uploads/downloads
|
|
22
|
+
- Embedding web content: WKWebView, local HTML, JS bridges
|
|
23
|
+
- Platform-specific work: Android Intents, iOS 17 privacy, Spotlight, iCloud, Core Motion, WatchKit, Siri
|
|
24
|
+
- Extending Titanium: Hyperloop, native modules, AndroidX migration
|
|
25
|
+
- CI/CD: Fastlane lanes, Appium UI tests, store deployment
|
|
26
|
+
|
|
27
|
+
Do NOT use for:
|
|
28
|
+
|
|
29
|
+
- Alloy MVC concepts, controllers, models, data binding (use `alloy-guides`)
|
|
30
|
+
- Alloy CLI, conditional views, custom XML tags, build hooks (use `alloy-howtos`)
|
|
31
|
+
- Titanium SDK fundamentals, `tiapp.xml` config basics, app distribution overview (use `ti-guides`)
|
|
32
|
+
- Looking up specific Titanium API signatures (use `ti-api`)
|
|
33
|
+
- Native module dependency updates (use `ti-module-update`)
|
|
34
|
+
|
|
35
|
+
## Quick reference
|
|
36
|
+
|
|
37
|
+
| Topic | Reference |
|
|
38
|
+
|---|---|
|
|
39
|
+
| GPS, distance filter, accuracy, geofencing | [location-and-maps.md](references/location-and-maps.md) |
|
|
40
|
+
| Google Maps v2 on Android: API keys, Play Services | [google-maps-v2.md](references/google-maps-v2.md) |
|
|
41
|
+
| iOS Map Kit: 3D camera, system buttons, callouts | [ios-map-kit.md](references/ios-map-kit.md) |
|
|
42
|
+
| Push notifications (APNs / FCM), local alerts, interactive notifications | [notification-services.md](references/notification-services.md) |
|
|
43
|
+
| HTTPClient lifecycle, JSON/XML, uploads, sockets, SOAP, SSL | [remote-data-sources.md](references/remote-data-sources.md) |
|
|
44
|
+
| Filesystem, SQLite, Properties, persistence strategy | [local-data-sources.md](references/local-data-sources.md) |
|
|
45
|
+
| Binary data with `Ti.Buffer`, `Ti.Codec`, streams | [buffer-codec-streams.md](references/buffer-codec-streams.md) |
|
|
46
|
+
| Audio playback/recording, video, camera, gallery, density assets | [media-apis.md](references/media-apis.md) |
|
|
47
|
+
| WKWebView, local/remote content, JS bridge | [web-content-integration.md](references/web-content-integration.md) |
|
|
48
|
+
| Webpack build pipeline (Ti 9.1.0+), npm integration, `@` alias | [webpack-build-pipeline.md](references/webpack-build-pipeline.md) |
|
|
49
|
+
| Android Intents, broadcast permissions, background services | [android-platform-deep-dives.md](references/android-platform-deep-dives.md) |
|
|
50
|
+
| iOS 17 privacy, silent push, Spotlight, Handoff, iCloud, Core Motion, WatchKit, Siri | [ios-platform-deep-dives.md](references/ios-platform-deep-dives.md) |
|
|
51
|
+
| Hyperloop, native Proxy/View modules, AndroidX migration | [extending-titanium.md](references/extending-titanium.md) |
|
|
52
|
+
| Memory management, leak detection, native debugging tools | [debugging-profiling.md](references/debugging-profiling.md) |
|
|
53
|
+
| Fastlane lanes, Appium UI testing, store deployment | [automation-fastlane-appium.md](references/automation-fastlane-appium.md) |
|
|
54
|
+
| Cross-platform strategy: shared vs platform-specific code | [cross-platform-development.md](references/cross-platform-development.md) |
|
|
55
|
+
| End-to-end tutorials: REST APIs, camera, geolocation, controller chaining, Fastlane | [tutorials.md](references/tutorials.md) |
|
|
56
|
+
| Obtaining, installing, and configuring native modules | [using-modules.md](references/using-modules.md) |
|
|
57
|
+
|
|
58
|
+
## Key practices
|
|
59
|
+
|
|
60
|
+
### iOS permissions
|
|
61
|
+
|
|
62
|
+
Required `tiapp.xml` keys for common features:
|
|
63
|
+
|
|
64
|
+
- Location: `NSLocationWhenInUseUsageDescription` or `NSLocationAlwaysAndWhenInUseUsageDescription`
|
|
65
|
+
- Motion activity: `NSMotionUsageDescription`
|
|
66
|
+
- Camera: `NSCameraUsageDescription`
|
|
67
|
+
- Photo library: `NSPhotoLibraryUsageDescription` (read) and `NSPhotoLibraryAddUsageDescription` (write)
|
|
68
|
+
- Microphone: `NSMicrophoneUsageDescription`
|
|
69
|
+
- iOS 17+: `PrivacyInfo.xcprivacy` for UserDefaults and File Timestamps (see [ios-platform-deep-dives.md](references/ios-platform-deep-dives.md))
|
|
70
|
+
|
|
71
|
+
### Android resource management
|
|
72
|
+
|
|
73
|
+
- Stop background services explicitly when no longer needed
|
|
74
|
+
- Use `distanceFilter` and FusedLocationProvider (requires `ti.playservices`) for battery-efficient location
|
|
75
|
+
- Intent filters: copy the root activity to `tiapp.xml`, then add action / data / category
|
|
76
|
+
|
|
77
|
+
### Data and networking
|
|
78
|
+
|
|
79
|
+
- HTTPClient: handle both `onload` and `onerror` — never just one
|
|
80
|
+
- SQLite: close both `db` and `resultSet` to avoid locks
|
|
81
|
+
- Filesystem: check `isExternalStoragePresent()` before using SD card storage
|
|
82
|
+
- Binary data: use `Ti.Buffer` and `Ti.Codec` for byte-level work; `BufferStream` / `FileStream` / `BlobStream` for chunked I/O
|
|
83
|
+
|
|
84
|
+
### Media and memory
|
|
85
|
+
|
|
86
|
+
- Camera / gallery: use `imageAsResized` to reduce memory pressure
|
|
87
|
+
- Audio: handle `pause` / `resume` for streaming interruptions
|
|
88
|
+
- WebView: avoid embedding inside TableView; set `touchEnabled=false` if needed
|
|
89
|
+
- Video: Android requires fullscreen; iOS supports embedded players
|
|
90
|
+
|
|
91
|
+
### Platform-specific properties need modifiers
|
|
92
|
+
|
|
93
|
+
Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` without platform modifiers can break cross-platform builds.
|
|
94
|
+
|
|
95
|
+
```javascript
|
|
96
|
+
// Wrong — adds Ti.UI.iOS to Android build
|
|
97
|
+
const win = Ti.UI.createWindow({
|
|
98
|
+
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
TSS modifier (Alloy):
|
|
103
|
+
|
|
104
|
+
```tss
|
|
105
|
+
"#mainWindow[platform=ios]": {
|
|
106
|
+
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Conditional code:
|
|
111
|
+
|
|
112
|
+
```javascript
|
|
113
|
+
if (OS_IOS) {
|
|
114
|
+
$.mainWindow.statusBarStyle = Ti.UI.iOS.StatusBar.LIGHT_CONTENT;
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Common offenders:
|
|
119
|
+
|
|
120
|
+
- iOS: `statusBarStyle`, `modalStyle`, `modalTransitionStyle`, any `Ti.UI.iOS.*` constant
|
|
121
|
+
- Android: `actionBar` config, any `Ti.UI.Android.*` constant
|
|
122
|
+
|
|
123
|
+
## Related skills
|
|
124
|
+
|
|
125
|
+
| Task | Use this skill |
|
|
126
|
+
|---|---|
|
|
127
|
+
| Alloy MVC concepts, controllers, models, data binding | `alloy-guides` |
|
|
128
|
+
| Alloy CLI, custom tags, build hooks, conditional views | `alloy-howtos` |
|
|
129
|
+
| Titanium SDK fundamentals, `tiapp.xml`, app distribution | `ti-guides` |
|
|
130
|
+
| Look up Titanium API properties, methods, events | `ti-api` |
|
|
131
|
+
| Native module dependency updates | `ti-module-update` |
|