Loading...
Loading...
Titanium SDK architecture and implementation expert. Use when designing, reviewing, analyzing, or examining Titanium project structure (Alloy or Classic), creating controllers/views/services, choosing models vs collections, implementing communication patterns, handling memory cleanup, testing, auditing code, or migrating legacy apps. Automatically identifies project type.
npx skill4agent add maccesar/titanium-sdk-skills ti-expertapp/app/views/app/controllers/alloy.jmkconfig.jsonResources/app.jsapp/lib/apilib/serviceslib/actionslib/repositorieslib/helperscleanup()index.js$app/lib/require()$.cleanup = cleanupServiceRegistry$servicelibapiservicesactionsrepositorieshelperspoliciesprovidersliblib/<type>/<file>.jslib/services/auth/session/login.jscontrollers/views/styles/const/letapplyProperties()$.cleanup = cleanupTi.UI.iOS.*Ti.UI.Android.*// Wrong: adds Ti.UI.iOS to Android project
"#mainWindow": {
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
}// Correct: only adds to iOS
"#mainWindow[platform=ios]": {
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
}statusBarStylemodalStylemodalTransitionStyleTi.UI.iOS.*actionBarTi.UI.Android.*[platform=ios][platform=android][formFactor=handheld][formFactor=tablet][if=Alloy.Globals.customVar]ti-uilayout: 'horizontal'layout: 'vertical'layoutwidth: Ti.UI.FILLwidth: '100%'height: Ti.UI.SIZEheight: Ti.UI.FILLOS_IOSOS_ANDROIDAlloy.CFGAlloy.Globals$.args$.destroy()platform="ios"formFactor="tablet"| Question | Answer |
|---|---|
| How to create a new Alloy project? | |
| Fastest way to build? | |
| Controller > 100 lines? | Extract to Tier 2 (Services) |
| More than 50 IDs in XML? | Use Tier 3 (ID Scoping) |
| Where does API call go? | |
| Where does business logic go? | |
How deep should | One level: |
| Where do I store auth tokens? | Keychain (iOS) / KeyStore (Android) via service |
| Models or Collections? | Collections for API data, Models for SQLite persistence |
| Ti.App.fireEvent or EventBus? | Always EventBus (Backbone.Events) |
| Direct navigation or service? | Always Navigation service (auto cleanup) |
| Inline styles or TSS files? | Always TSS files (per-controller + |