Ti howtos
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`.From its SKILL.md
npx -y skills add macCesar/titools --skill ti-howtosAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.8 KB, as published. Nobody here has run it
ti-howtos
Overview
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.
When to use
Use this skill when:
- The project contains
tiapp.xml - Implementing device features: GPS, camera, push notifications, sensors
- Adding maps: Google Maps v2 on Android or Map Kit on iOS
- Working with media: audio, video, image gallery, density assets
- Persisting data: SQLite, Properties, Filesystem, encrypted storage
- Networking: HTTPClient, sockets, SOAP, SSL/TLS, file uploads/downloads
- Embedding web content: WKWebView, local HTML, JS bridges
- Platform-specific work: Android Intents, iOS 17 privacy, Spotlight, iCloud, Core Motion, WatchKit, Siri
- Extending Titanium: Hyperloop, native modules, AndroidX migration
- CI/CD: Fastlane lanes, Appium UI tests, store deployment
Do NOT use for:
- Alloy MVC concepts, controllers, models, data binding (use
alloy-guides) - Alloy CLI, conditional views, custom XML tags, build hooks (use
alloy-howtos) - Titanium SDK fundamentals,
tiapp.xmlconfig basics, app distribution overview (useti-guides) - Looking up specific Titanium API signatures (use
ti-api) - Native module dependency updates (use
ti-module-update)
Quick reference
| Topic | Reference |
|---|---|
| GPS, distance filter, accuracy, geofencing | location-and-maps.md |
| Google Maps v2 on Android: API keys, Play Services | google-maps-v2.md |
| iOS Map Kit: 3D camera, system buttons, callouts | ios-map-kit.md |
| Push notifications (APNs / FCM), local alerts, interactive notifications | notification-services.md |
| HTTPClient lifecycle, JSON/XML, uploads, sockets, SOAP, SSL | remote-data-sources.md |
| Filesystem, SQLite, Properties, persistence strategy | local-data-sources.md |
Binary data with Ti.Buffer, Ti.Codec, streams | buffer-codec-streams.md |
| Audio playback/recording, video, camera, gallery, density assets | media-apis.md |
| WKWebView, local/remote content, JS bridge | web-content-integration.md |
Webpack build pipeline (Ti 9.1.0+), npm integration, @ alias | webpack-build-pipeline.md |
| Android Intents, broadcast permissions, background services | android-platform-deep-dives.md |
| iOS 17 privacy, silent push, Spotlight, Handoff, iCloud, Core Motion, WatchKit, Siri | ios-platform-deep-dives.md |
| Hyperloop, native Proxy/View modules, AndroidX migration | extending-titanium.md |
| Memory management, leak detection, native debugging tools | debugging-profiling.md |
| Fastlane lanes, Appium UI testing, store deployment | automation-fastlane-appium.md |
| Cross-platform strategy: shared vs platform-specific code | cross-platform-development.md |
| End-to-end tutorials: REST APIs, camera, geolocation, controller chaining, Fastlane | tutorials.md |
| Obtaining, installing, and configuring native modules | using-modules.md |
Key practices
iOS permissions
Required tiapp.xml keys for common features:
- Location:
NSLocationWhenInUseUsageDescriptionorNSLocationAlwaysAndWhenInUseUsageDescription - Motion activity:
NSMotionUsageDescription - Camera:
NSCameraUsageDescription - Photo library:
NSPhotoLibraryUsageDescription(read) andNSPhotoLibraryAddUsageDescription(write) - Microphone:
NSMicrophoneUsageDescription - iOS 17+:
PrivacyInfo.xcprivacyfor UserDefaults and File Timestamps (see ios-platform-deep-dives.md)
Android resource management
- Stop background services explicitly when no longer needed
- Use
distanceFilterand FusedLocationProvider (requiresti.playservices) for battery-efficient location - Intent filters: copy the root activity to
tiapp.xml, then add action / data / category
Data and networking
- HTTPClient: handle both
onloadandonerror— never just one - SQLite: close both
dbandresultSetto avoid locks - Filesystem: check
isExternalStoragePresent()before using SD card storage - Binary data: use
Ti.BufferandTi.Codecfor byte-level work;BufferStream/FileStream/BlobStreamfor chunked I/O
Media and memory
- Camera / gallery: use
imageAsResizedto reduce memory pressure - Audio: handle
pause/resumefor streaming interruptions - WebView: avoid embedding inside TableView; set
touchEnabled=falseif needed - Video: Android requires fullscreen; iOS supports embedded players
Platform-specific properties need modifiers
Using Ti.UI.iOS.* or Ti.UI.Android.* without platform modifiers can break cross-platform builds.
// Wrong — adds Ti.UI.iOS to Android build
const win = Ti.UI.createWindow({
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
});
TSS modifier (Alloy):
"#mainWindow[platform=ios]": {
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
}
Conditional code:
if (OS_IOS) {
$.mainWindow.statusBarStyle = Ti.UI.iOS.StatusBar.LIGHT_CONTENT;
}
Common offenders:
- iOS:
statusBarStyle,modalStyle,modalTransitionStyle, anyTi.UI.iOS.*constant - Android:
actionBarconfig, anyTi.UI.Android.*constant
Related skills
| Task | Use this skill |
|---|---|
| Alloy MVC concepts, controllers, models, data binding | alloy-guides |
| Alloy CLI, custom tags, build hooks, conditional views | alloy-howtos |
Titanium SDK fundamentals, tiapp.xml, app distribution | ti-guides |
| Look up Titanium API properties, methods, events | ti-api |
| Native module dependency updates | ti-module-update |