@maccesar/titools 2.2.4 → 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.
Files changed (96) hide show
  1. package/README.md +23 -23
  2. package/lib/commands/update.js +4 -12
  3. package/package.json +1 -1
  4. package/skills/alloy-guides/SKILL.md +31 -31
  5. package/skills/alloy-guides/references/CONCEPTS.md +3 -3
  6. package/skills/alloy-guides/references/CONTROLLERS.md +1 -1
  7. package/skills/alloy-guides/references/MODELS.md +6 -6
  8. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +1 -1
  9. package/skills/alloy-guides/references/VIEWS_XML.md +1 -1
  10. package/skills/alloy-guides/references/WIDGETS.md +1 -1
  11. package/skills/alloy-howtos/SKILL.md +27 -27
  12. package/skills/alloy-howtos/references/best_practices.md +9 -9
  13. package/skills/alloy-howtos/references/cli_reference.md +14 -14
  14. package/skills/alloy-howtos/references/config_files.md +16 -16
  15. package/skills/alloy-howtos/references/custom_tags.md +16 -16
  16. package/skills/alloy-howtos/references/debugging_troubleshooting.md +11 -15
  17. package/skills/alloy-howtos/references/samples.md +19 -19
  18. package/skills/purgetss/SKILL.md +11 -1
  19. package/skills/purgetss/references/animation-system.md +1 -1
  20. package/skills/purgetss/references/cli-commands.md +3 -3
  21. package/skills/purgetss/references/customization-deep-dive.md +1 -1
  22. package/skills/purgetss/references/dynamic-component-creation.md +1 -1
  23. package/skills/purgetss/references/icon-fonts.md +4 -0
  24. package/skills/purgetss/references/installation-setup.md +8 -1
  25. package/skills/purgetss/references/migration-guide.md +4 -0
  26. package/skills/purgetss/references/tikit-components.md +193 -204
  27. package/skills/purgetss/references/ui-ux-design.md +1 -1
  28. package/skills/ti-expert/SKILL.md +78 -118
  29. package/skills/ti-expert/references/alloy-builtins.md +18 -18
  30. package/skills/ti-expert/references/alloy-structure.md +21 -21
  31. package/skills/ti-expert/references/anti-patterns.md +15 -15
  32. package/skills/ti-expert/references/cli-expert.md +15 -15
  33. package/skills/ti-expert/references/code-conventions.md +38 -38
  34. package/skills/ti-expert/references/contracts.md +8 -8
  35. package/skills/ti-expert/references/controller-patterns.md +14 -14
  36. package/skills/ti-expert/references/error-handling.md +11 -11
  37. package/skills/ti-expert/references/examples.md +12 -12
  38. package/skills/ti-expert/references/migration-patterns.md +24 -24
  39. package/skills/ti-expert/references/patterns.md +10 -10
  40. package/skills/ti-expert/references/performance-listview.md +16 -16
  41. package/skills/ti-expert/references/performance-optimization.md +41 -41
  42. package/skills/ti-expert/references/security-device.md +22 -22
  43. package/skills/ti-expert/references/security-fundamentals.md +19 -19
  44. package/skills/ti-expert/references/state-management.md +33 -33
  45. package/skills/ti-expert/references/testing-e2e-ci.md +25 -25
  46. package/skills/ti-expert/references/testing-unit.md +24 -24
  47. package/skills/ti-expert/references/theming.md +15 -15
  48. package/skills/ti-guides/SKILL.md +58 -60
  49. package/skills/ti-guides/references/advanced-data-and-images.md +33 -33
  50. package/skills/ti-guides/references/android-manifest.md +15 -15
  51. package/skills/ti-guides/references/app-distribution.md +70 -166
  52. package/skills/ti-guides/references/application-frameworks.md +96 -114
  53. package/skills/ti-guides/references/cli-reference.md +294 -294
  54. package/skills/ti-guides/references/coding-best-practices.md +42 -33
  55. package/skills/ti-guides/references/commonjs-advanced.md +57 -51
  56. package/skills/ti-guides/references/hello-world.md +36 -36
  57. package/skills/ti-guides/references/hyperloop-native-access.md +66 -66
  58. package/skills/ti-guides/references/javascript-primer.md +83 -101
  59. package/skills/ti-guides/references/reserved-words.md +9 -9
  60. package/skills/ti-guides/references/resources.md +75 -83
  61. package/skills/ti-guides/references/style-and-conventions.md +35 -28
  62. package/skills/ti-guides/references/tiapp-config.md +110 -74
  63. package/skills/ti-howtos/SKILL.md +88 -92
  64. package/skills/ti-howtos/references/android-platform-deep-dives.md +104 -104
  65. package/skills/ti-howtos/references/automation-fastlane-appium.md +39 -39
  66. package/skills/ti-howtos/references/buffer-codec-streams.md +60 -60
  67. package/skills/ti-howtos/references/cross-platform-development.md +115 -136
  68. package/skills/ti-howtos/references/debugging-profiling.md +167 -181
  69. package/skills/ti-howtos/references/extending-titanium.md +121 -121
  70. package/skills/ti-howtos/references/google-maps-v2.md +84 -82
  71. package/skills/ti-howtos/references/ios-map-kit.md +65 -60
  72. package/skills/ti-howtos/references/ios-platform-deep-dives.md +123 -123
  73. package/skills/ti-howtos/references/local-data-sources.md +79 -78
  74. package/skills/ti-howtos/references/location-and-maps.md +116 -120
  75. package/skills/ti-howtos/references/media-apis.md +87 -86
  76. package/skills/ti-howtos/references/notification-services.md +250 -260
  77. package/skills/ti-howtos/references/remote-data-sources.md +98 -93
  78. package/skills/ti-howtos/references/tutorials.md +226 -216
  79. package/skills/ti-howtos/references/using-modules.md +73 -102
  80. package/skills/ti-howtos/references/web-content-integration.md +101 -103
  81. package/skills/ti-howtos/references/webpack-build-pipeline.md +52 -44
  82. package/skills/ti-ui/SKILL.md +85 -85
  83. package/skills/ti-ui/references/accessibility-deep-dive.md +57 -57
  84. package/skills/ti-ui/references/animation-and-matrices.md +79 -79
  85. package/skills/ti-ui/references/application-structures.md +96 -99
  86. package/skills/ti-ui/references/custom-fonts-styling.md +99 -99
  87. package/skills/ti-ui/references/event-handling.md +58 -58
  88. package/skills/ti-ui/references/gestures.md +62 -64
  89. package/skills/ti-ui/references/icons-and-splash-screens.md +88 -88
  90. package/skills/ti-ui/references/layouts-and-positioning.md +87 -97
  91. package/skills/ti-ui/references/listviews-and-performance.md +107 -107
  92. package/skills/ti-ui/references/orientation.md +87 -88
  93. package/skills/ti-ui/references/platform-ui-android.md +87 -81
  94. package/skills/ti-ui/references/platform-ui-ios.md +63 -61
  95. package/skills/ti-ui/references/scrolling-views.md +29 -29
  96. package/skills/ti-ui/references/tableviews.md +56 -56
@@ -1,10 +1,10 @@
1
- # App Distribution Guide
1
+ # App distribution guide
2
2
 
3
- Complete guide for distributing Titanium apps to Google Play (Android) and App Store (iOS).
3
+ Guide for distributing Titanium apps to Google Play (Android) and the App Store (iOS).
4
4
 
5
- ## Android Distribution
5
+ ## Android distribution
6
6
 
7
- ### 1. Generate Keystore and Certificate
7
+ ### 1. Generate keystore and certificate
8
8
 
9
9
  Create a keystore for signing your app:
10
10
 
@@ -12,14 +12,14 @@ Create a keystore for signing your app:
12
12
  keytool -genkeypair -v -keystore android.keystore -alias helloworld -keyalg RSA -sigalg SHA1withRSA -validity 10000
13
13
  ```
14
14
 
15
- **Requirements:**
15
+ Requirements:
16
16
  - `keyalg`: RSA (required by Google Play)
17
17
  - `sigalg`: SHA1withRSA (Android 4.3-) or SHA256withRSA (Android 4.4+)
18
18
  - `validity`: 10000 days minimum (~25 years)
19
19
 
20
- **CRITICAL**: Save your keystore password securely. If lost, you cannot release updates.
20
+ Save your keystore password securely. If it is lost, you cannot release updates.
21
21
 
22
- ### 2. Verify Keystore
22
+ ### 2. Verify keystore
23
23
 
24
24
  ```bash
25
25
  keytool -list -v -keystore android.keystore
@@ -27,64 +27,64 @@ keytool -list -v -keystore android.keystore
27
27
 
28
28
  ### 3. Build for Google Play
29
29
 
30
- **CLI command:**
30
+ CLI command:
31
31
  ```bash
32
32
  ti build -p android -T dist-playstore [-K <KEYSTORE_FILE> -P <KEYSTORE_PASSWORD> -L <KEYSTORE_ALIAS> -O <OUTPUT_DIRECTORY>]
33
33
  ```
34
34
 
35
- **Example:**
35
+ Example:
36
36
  ```bash
37
37
  ti build -p android -T dist-playstore -K ~/android.keystore -P secret -L foo -O ./dist/
38
38
  ```
39
39
 
40
- **Output files:**
41
- - `.apk` - Legacy format (still supported)
42
- - `.aab` - Android App Bundle (preferred, smaller downloads). Requires Titanium 9.0.0+. An AAB file cannot be installed directly on a device; it is a publishing format for Google Play only. Once uploaded, Google Play generates multiple device-specific APKs split by CPU architecture and image density, allowing smaller downloads.
40
+ Output files:
41
+ - `.apk`: legacy format (still supported)
42
+ - `.aab`: Android App Bundle (preferred, smaller downloads). Requires Titanium 9.0.0+. An AAB file cannot be installed directly on a device. After upload, Google Play generates device-specific APKs split by CPU architecture and image density.
43
43
 
44
- ### 4. Verify APK Signing
44
+ ### 4. Verify APK signing
45
45
 
46
46
  ```bash
47
47
  jarsigner -verify -verbose path/yourapp.apk
48
48
  ```
49
49
 
50
- ### 5. Deploy to Device for Testing
50
+ ### 5. Deploy to device for testing
51
51
 
52
- **Using CLI:**
52
+ Using CLI:
53
53
  ```bash
54
54
  ti build -p android -T device --device-id "<DEVICE_ID>"
55
55
  ```
56
56
 
57
- **Using adb:**
57
+ Using adb:
58
58
  ```bash
59
59
  adb install -r your_project/build/android/bin/app.apk
60
60
  adb uninstall com.your.appid
61
61
  ```
62
62
 
63
- **Remote testing:**
64
- - Host APK on web/Dropbox and email link
63
+ Remote testing:
64
+ - Host the APK on a web server or Dropbox and email a link
65
65
  - Use HockeyKit/HockeyApp for beta distribution
66
66
 
67
- ### 6. Google Play Submission Requirements
67
+ ### 6. Google Play submission requirements
68
68
 
69
- **Required assets:**
70
- - Minimum 2 screenshots (320x480, 480x800, or 480x854)
69
+ Required assets:
70
+ - At least 2 screenshots (320x480, 480x800, or 480x854)
71
71
  - High-res icon (512x512)
72
72
  - Title, description (4000 chars max)
73
73
  - Promo text (80 chars max)
74
74
  - Category and content rating
75
75
  - Contact information
76
76
 
77
- **Versioning in tiapp.xml:**
77
+ Versioning in `tiapp.xml`:
78
78
  ```xml
79
79
  <android xmlns:android="http://schemas.android.com/apk/res/android">
80
80
  <manifest android:versionCode="2" android:versionName="1.0.1"/>
81
81
  </android>
82
82
  ```
83
83
 
84
- - `versionCode`: Must be a 32-bit integer (whole number), must increment for each update. Cannot be a floating point number.
85
- - `versionName`: String, any format you prefer
84
+ - `versionCode`: must be a 32-bit integer and increment for each update. No floating point values.
85
+ - `versionName`: string in any format you choose
86
86
 
87
- ### 7. SD Card Installation
87
+ ### 7. SD card installation
88
88
 
89
89
  ```xml
90
90
  <android xmlns:android="http://schemas.android.com/apk/res/android">
@@ -96,45 +96,45 @@ Values: `preferExternal`, `auto`, `internalOnly`
96
96
 
97
97
  ---
98
98
 
99
- ## iOS Distribution
99
+ ## iOS distribution
100
100
 
101
- ### 1. Distribution Types
101
+ ### 1. Distribution types
102
102
 
103
- - **App Store**: Public distribution via App Store (formerly known as iTunes Connect, now App Store Connect)
104
- - **Ad Hoc**: Limited testing (max 100 devices per year; devices cannot be removed once registered, so use care when registering)
105
- - **In House**: Enterprise distribution for employees (Enterprise program only)
103
+ - App Store: public distribution via App Store (formerly iTunes Connect, now App Store Connect)
104
+ - Ad Hoc: limited testing (max 100 devices per year; devices cannot be removed once registered, so use care when registering)
105
+ - In House: enterprise distribution for employees (Enterprise program only)
106
106
 
107
- ### 2. Create Distribution Certificate
107
+ ### 2. Create distribution certificate
108
108
 
109
- **Certificate types:**
110
- - **Development certificate**: Each developer on the team can have their own, used for building test versions.
111
- - **Distribution certificate**: A single certificate for the entire team. Only the Team Agent (the account owner who oversees final distribution) can create it. This ensures developers cannot publish the final app without authorization.
109
+ Certificate types:
110
+ - Development certificate: each developer can have their own, used for test builds.
111
+ - Distribution certificate: a single certificate for the entire team. Only the Team Agent (account owner) can create it.
112
112
 
113
- **Steps:**
114
- 1. Log in to [Apple Developer Member Center](https://developer.apple.com/membercenter/) as Team Agent or Admin
115
- 2. Go to **Certificates, Identifiers & Profiles** > **Certificates**
116
- 3. Click **+** > **App Store and Ad Hoc**
117
- 4. Create a CSR (Certificate Signing Request) in Keychain Access
118
- 5. Upload CSR and generate certificate
119
- 6. Download and install the `.cer` file
120
- 7. **CRITICAL**: Export private key as `.p12` file (File > Export Items)
113
+ Steps:
114
+ 1. Log in to Apple Developer Member Center as Team Agent or Admin.
115
+ 2. Go to Certificates, Identifiers & Profiles, then Certificates.
116
+ 3. Click +, then choose App Store and Ad Hoc.
117
+ 4. Create a CSR (Certificate Signing Request) in Keychain Access.
118
+ 5. Upload the CSR and generate the certificate.
119
+ 6. Download and install the `.cer` file.
120
+ 7. Export the private key as a `.p12` file (File > Export Items).
121
121
 
122
- ### 3. Create Distribution Provisioning Profile
122
+ ### 3. Create distribution provisioning profile
123
123
 
124
- 1. In [Member Center](https://developer.apple.com/membercenter/), go to **Provisioning Profiles**
125
- 2. Click **+** > select distribution type
126
- 3. Select App ID
127
- 4. Select distribution certificate
128
- 5. For Ad Hoc: select test devices
129
- 6. Name profile (include "distribution" or "ad hoc")
130
- 7. Download `.mobileprovision` and install (drag to Xcode icon)
124
+ 1. In Member Center, go to Provisioning Profiles.
125
+ 2. Click + and select the distribution type.
126
+ 3. Select an App ID.
127
+ 4. Select the distribution certificate.
128
+ 5. For Ad Hoc, select test devices.
129
+ 6. Name the profile (include "distribution" or "ad hoc").
130
+ 7. Download the `.mobileprovision` file and install it (drag to Xcode).
131
131
 
132
132
  ### 4. Create App ID on App Store Connect
133
133
 
134
- App Store Connect (formerly iTunes Connect) is the app distribution management portal.
134
+ App Store Connect is the portal for app distribution management.
135
135
 
136
- 1. Log in to App Store Connect
137
- 2. **Manage Your Apps** > **Add New App**
136
+ 1. Log in to App Store Connect.
137
+ 2. Go to Manage Your Apps, then Add New App.
138
138
  3. Provide:
139
139
  - App name
140
140
  - SKU number (unique ID)
@@ -153,26 +153,26 @@ App Store Connect (formerly iTunes Connect) is the app distribution management p
153
153
  - iPhone (3.5"): 960x640, 960x600, 640x960, or 640x920
154
154
  - iPhone (4"): 1136x640, 1136x600, 640x1136, or 640x1096
155
155
  - iPad: 1024x768, 1024x748, 768x1024, 768x1004, 2048x1536, 2048x1496, 1536x2048, or 1536x2008
156
- 5. Click **Ready to Upload Binary**
156
+ 5. Click Ready to Upload Binary.
157
157
 
158
- ### 5. Build and Package
158
+ ### 5. Build and package
159
159
 
160
- **CLI command - Ad Hoc:**
160
+ CLI command - Ad Hoc:
161
161
  ```bash
162
162
  ti build -p ios -T dist-adhoc [-R <DISTRIBUTION_CERTIFICATE_NAME> -P <PROVISIONING_PROFILE_UUID> -O <OUTPUT_DIRECTORY>]
163
163
  ```
164
164
 
165
- **Example:**
165
+ Example:
166
166
  ```bash
167
167
  ti build -p ios -T dist-adhoc -R "Pseudo, Inc." -P "FFFFFFFF-EEEE-DDDD-CCCC-BBBBBBBBBBBB" -O ./dist/
168
168
  ```
169
169
 
170
- **CLI command - App Store:**
170
+ CLI command - App Store:
171
171
  ```bash
172
172
  ti build -p ios -T dist-appstore [-R <DISTRIBUTION_CERTIFICATE_NAME> -P <PROVISIONING_PROFILE_UUID>]
173
173
  ```
174
174
 
175
- **Example:**
175
+ Example:
176
176
  ```bash
177
177
  ti build -p ios -T dist-appstore -R "Pseudo, Inc." -P "AAAAAAAA-0000-9999-8888-777777777777"
178
178
  ```
@@ -181,116 +181,20 @@ The CLI installs the package to Xcode's Organizer.
181
181
 
182
182
  ### 6. Upload to App Store Connect
183
183
 
184
- 1. Open Xcode > **Window** > **Organizer**
185
- 2. Select your app archive
186
- 3. Click **Verify** (validates against App Store Connect app definition)
187
- 4. Click **Submit** (uploads app)
188
- 5. Status changes to **Waiting for Review**
184
+ 1. Open Xcode, then Window, then Organizer.
185
+ 2. Select your app archive.
186
+ 3. Click Verify to validate against the App Store Connect app definition.
187
+ 4. Click Submit to upload.
188
+ 5. Status changes to Waiting for Review.
189
189
 
190
- ### 7. Ad Hoc Distribution
190
+ ### 7. Ad Hoc distribution
191
191
 
192
192
  Testers need:
193
193
  - The `.mobileprovision` file installed on their device
194
194
  - The `.ipa` package file
195
195
 
196
- **Installation method:**
197
- 1. Connect device to Mac
198
- 2. Open Xcode > **Window** > **Devices**
199
- 3. Select device > **Installed Apps** > **+**
200
- 4. Select IPA file
201
-
202
- ### 8. App Thinning (iOS)
203
-
204
- App Thinning optimizes your application by reducing its installed size on devices.
205
-
206
- **Slicing (Asset Catalog):**
207
- - Installs only the assets needed for the specific device (e.g., @2x images for non-Plus iPhones, @3x for Plus/Pro models)
208
- - When enabled, Titanium automatically adds all PNG and JPEG images to an Asset Catalog
209
- - Images with matching suffixes (@2x, @3x, etc.) are grouped into one imageset
210
- - **Important limitation**: When slicing is enabled, you cannot access images from the filesystem using `Ti.Filesystem` or path/URL-based access. Only use image names (without path) in ImageView and similar APIs.
211
- - Icons and launch images are always added to the Asset Catalog
212
-
213
- **Enable slicing in tiapp.xml:**
214
- ```xml
215
- <ti:app>
216
- <ios>
217
- <use-app-thinning>true</use-app-thinning>
218
- </ios>
219
- </ti:app>
220
- ```
221
-
222
- By default, slicing is disabled.
223
-
224
- **Bitcode:**
225
- - Submits partially compiled code to App Store Connect, which then optimizes and compiles for specific architectures
226
- - Currently disabled in Titanium because all frameworks (including third-party modules) must have bitcode enabled
227
-
228
- **On-Demand Resources:**
229
- - Resources tagged into groups, stored on Apple servers, downloaded when needed by the app
230
- - iOS purges on-demand resources when device disk space is low
231
- - Titanium SDK does not currently provide a way to tag on-demand resources
232
-
233
- ### 9. App Store Requirements
234
-
235
- Apple's guidelines include:
236
- - Apps must be useful, well-designed, and error-free
237
- - No downloading/executing code
238
- - You must own all copyrights and trademarks
239
- - No hidden features or non-public APIs
240
- - [Full guidelines](http://developer.apple.com/appstore/resources/approval/guidelines.html)
241
-
242
- ---
243
-
244
- ## Device Deployment Testing
245
-
246
- ### Android Device Setup
247
-
248
- 1. Enable **Developer options** (tap **Build number** 7 times in **About**)
249
- 2. Enable **USB debugging** in **Developer options**
250
- 3. Enable **Unknown sources** in **Security**
251
- 4. Connect via USB (use data cable, not power-only)
252
- 5. Allow USB debugging when prompted
253
-
254
- **Windows only**: Install [OEM USB drivers](http://developer.android.com/sdk/oem-usb.html)
255
-
256
- ### iOS Device Setup
257
-
258
- Requires development certificate and provisioning profile. See [Deploying to iOS devices](#ios-distribution).
259
-
260
- ---
261
-
262
- ## Troubleshooting
263
-
264
- ### Android: Device Not Recognized
265
-
266
- ```bash
267
- adb devices # Check connected devices
268
- adb kill-server # Restart adb
269
- adb start-server
270
- adb devices # Verify
271
- ```
272
-
273
- ### Android: Check Platform Compatibility
274
-
275
- ```bash
276
- ti info -p android
277
- ```
278
-
279
- ### iOS: Mavericks Permission Issues
280
-
281
- Grant CLI access in **System Preferences** > **Security & Privacy** > **Privacy**
282
-
283
- ### General: Clean Build Folder
284
-
285
- ```bash
286
- ti clean [-p <PLATFORM>]
287
- ```
288
-
289
- ---
290
-
291
- ## References
292
-
293
- - [Google Play Developer Policies](http://play.google.com/about/developer-content-policy.html)
294
- - [Google Play Graphic Assets](http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=1078870)
295
- - [iTunes Connect Developer Guide](http://developer.apple.com/library/mac/#documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/)
296
- - [iOS App Store Review Guidelines](http://developer.apple.com/appstore/resources/approval/guidelines.html)
196
+ Installation method:
197
+ 1. Connect the device to a Mac.
198
+ 2. Open Xcode, then Window, then Devices.
199
+ 3. Select the device, then Installed Apps, then +.
200
+ 4. Select the IPA file.