@maccesar/titools 2.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.
Files changed (120) hide show
  1. package/AGENTS-TEMPLATE.md +173 -0
  2. package/README.md +867 -0
  3. package/agents/ti-researcher.md +108 -0
  4. package/bin/titools.js +53 -0
  5. package/lib/commands/agents.js +126 -0
  6. package/lib/commands/install.js +188 -0
  7. package/lib/commands/uninstall.js +215 -0
  8. package/lib/commands/update.js +159 -0
  9. package/lib/config.js +119 -0
  10. package/lib/downloader.js +153 -0
  11. package/lib/installer.js +253 -0
  12. package/lib/platform.js +108 -0
  13. package/lib/symlink.js +142 -0
  14. package/lib/utils.js +270 -0
  15. package/package.json +67 -0
  16. package/skills/alloy-expert/SKILL.md +247 -0
  17. package/skills/alloy-expert/assets/ControllerAutoCleanup.js +182 -0
  18. package/skills/alloy-expert/references/alloy-structure.md +381 -0
  19. package/skills/alloy-expert/references/anti-patterns.md +133 -0
  20. package/skills/alloy-expert/references/code-conventions.md +469 -0
  21. package/skills/alloy-expert/references/contracts.md +280 -0
  22. package/skills/alloy-expert/references/controller-patterns.md +520 -0
  23. package/skills/alloy-expert/references/error-handling.md +484 -0
  24. package/skills/alloy-expert/references/examples.md +735 -0
  25. package/skills/alloy-expert/references/migration-patterns.md +298 -0
  26. package/skills/alloy-expert/references/patterns.md +448 -0
  27. package/skills/alloy-expert/references/performance-patterns.md +855 -0
  28. package/skills/alloy-expert/references/security-patterns.md +847 -0
  29. package/skills/alloy-expert/references/state-management.md +779 -0
  30. package/skills/alloy-expert/references/testing.md +872 -0
  31. package/skills/alloy-guides/SKILL.md +214 -0
  32. package/skills/alloy-guides/references/CLI_TASKS.md +243 -0
  33. package/skills/alloy-guides/references/CONCEPTS.md +191 -0
  34. package/skills/alloy-guides/references/CONTROLLERS.md +298 -0
  35. package/skills/alloy-guides/references/MODELS.md +1028 -0
  36. package/skills/alloy-guides/references/PURGETSS.md +56 -0
  37. package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +242 -0
  38. package/skills/alloy-guides/references/VIEWS_STYLES.md +388 -0
  39. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +109 -0
  40. package/skills/alloy-guides/references/VIEWS_XML.md +558 -0
  41. package/skills/alloy-guides/references/WIDGETS.md +176 -0
  42. package/skills/alloy-howtos/SKILL.md +203 -0
  43. package/skills/alloy-howtos/references/best_practices.md +138 -0
  44. package/skills/alloy-howtos/references/cli_reference.md +253 -0
  45. package/skills/alloy-howtos/references/config_files.md +87 -0
  46. package/skills/alloy-howtos/references/custom_tags.md +147 -0
  47. package/skills/alloy-howtos/references/debugging_troubleshooting.md +101 -0
  48. package/skills/alloy-howtos/references/samples.md +167 -0
  49. package/skills/purgetss/SKILL.md +442 -0
  50. package/skills/purgetss/assets/purgetss.config.cjs +17 -0
  51. package/skills/purgetss/references/EXAMPLES.md +247 -0
  52. package/skills/purgetss/references/animation-system.md +1294 -0
  53. package/skills/purgetss/references/apply-directive.md +375 -0
  54. package/skills/purgetss/references/arbitrary-values.md +612 -0
  55. package/skills/purgetss/references/class-index.md +1350 -0
  56. package/skills/purgetss/references/cli-commands.md +948 -0
  57. package/skills/purgetss/references/configurable-properties.md +654 -0
  58. package/skills/purgetss/references/custom-rules.md +161 -0
  59. package/skills/purgetss/references/customization-deep-dive.md +722 -0
  60. package/skills/purgetss/references/dynamic-component-creation.md +489 -0
  61. package/skills/purgetss/references/grid-layout.md +455 -0
  62. package/skills/purgetss/references/icon-fonts.md +609 -0
  63. package/skills/purgetss/references/installation-setup.md +366 -0
  64. package/skills/purgetss/references/opacity-modifier.md +291 -0
  65. package/skills/purgetss/references/platform-modifiers.md +479 -0
  66. package/skills/purgetss/references/smart-mappings.md +42 -0
  67. package/skills/purgetss/references/titanium-resets.md +359 -0
  68. package/skills/purgetss/references/ui-ux-design.md +1526 -0
  69. package/skills/ti-guides/SKILL.md +94 -0
  70. package/skills/ti-guides/references/advanced-data-and-images.md +19 -0
  71. package/skills/ti-guides/references/alloy-cli-advanced.md +84 -0
  72. package/skills/ti-guides/references/alloy-data-mastery.md +29 -0
  73. package/skills/ti-guides/references/alloy-widgets-and-themes.md +19 -0
  74. package/skills/ti-guides/references/android-manifest.md +97 -0
  75. package/skills/ti-guides/references/app-distribution.md +258 -0
  76. package/skills/ti-guides/references/application-frameworks.md +377 -0
  77. package/skills/ti-guides/references/cli-reference.md +402 -0
  78. package/skills/ti-guides/references/coding-best-practices.md +102 -0
  79. package/skills/ti-guides/references/commonjs-advanced.md +134 -0
  80. package/skills/ti-guides/references/hello-world.md +100 -0
  81. package/skills/ti-guides/references/hyperloop-native-access.md +62 -0
  82. package/skills/ti-guides/references/javascript-primer.md +411 -0
  83. package/skills/ti-guides/references/reserved-words.md +36 -0
  84. package/skills/ti-guides/references/resources.md +183 -0
  85. package/skills/ti-guides/references/style-and-conventions.md +48 -0
  86. package/skills/ti-guides/references/tiapp-config.md +609 -0
  87. package/skills/ti-howtos/SKILL.md +174 -0
  88. package/skills/ti-howtos/references/android-platform-deep-dives.md +658 -0
  89. package/skills/ti-howtos/references/automation-fastlane-appium.md +95 -0
  90. package/skills/ti-howtos/references/buffer-codec-streams.md +140 -0
  91. package/skills/ti-howtos/references/cross-platform-development.md +348 -0
  92. package/skills/ti-howtos/references/debugging-profiling.md +543 -0
  93. package/skills/ti-howtos/references/extending-titanium.md +723 -0
  94. package/skills/ti-howtos/references/google-maps-v2.md +169 -0
  95. package/skills/ti-howtos/references/ios-map-kit.md +143 -0
  96. package/skills/ti-howtos/references/ios-platform-deep-dives.md +783 -0
  97. package/skills/ti-howtos/references/local-data-sources.md +301 -0
  98. package/skills/ti-howtos/references/location-and-maps.md +252 -0
  99. package/skills/ti-howtos/references/media-apis.md +210 -0
  100. package/skills/ti-howtos/references/notification-services.md +599 -0
  101. package/skills/ti-howtos/references/remote-data-sources.md +349 -0
  102. package/skills/ti-howtos/references/tutorials.md +502 -0
  103. package/skills/ti-howtos/references/using-modules.md +237 -0
  104. package/skills/ti-howtos/references/web-content-integration.md +307 -0
  105. package/skills/ti-howtos/references/webpack-build-pipeline.md +78 -0
  106. package/skills/ti-ui/SKILL.md +179 -0
  107. package/skills/ti-ui/references/accessibility-deep-dive.md +242 -0
  108. package/skills/ti-ui/references/animation-and-matrices.md +599 -0
  109. package/skills/ti-ui/references/application-structures.md +655 -0
  110. package/skills/ti-ui/references/custom-fonts-styling.md +579 -0
  111. package/skills/ti-ui/references/event-handling.md +393 -0
  112. package/skills/ti-ui/references/gestures.md +473 -0
  113. package/skills/ti-ui/references/icons-and-splash-screens.md +409 -0
  114. package/skills/ti-ui/references/layouts-and-positioning.md +462 -0
  115. package/skills/ti-ui/references/listviews-and-performance.md +619 -0
  116. package/skills/ti-ui/references/orientation.md +362 -0
  117. package/skills/ti-ui/references/platform-ui-android.md +635 -0
  118. package/skills/ti-ui/references/platform-ui-ios.md +469 -0
  119. package/skills/ti-ui/references/scrolling-views.md +252 -0
  120. package/skills/ti-ui/references/tableviews.md +568 -0
@@ -0,0 +1,409 @@
1
+ # Icons and Splash Screens
2
+
3
+ ## Table of Contents
4
+
5
+ - [Icons and Splash Screens](#icons-and-splash-screens)
6
+ - [Table of Contents](#table-of-contents)
7
+ - [1. Overview](#1-overview)
8
+ - [2. Asset Locations](#2-asset-locations)
9
+ - [3. DefaultIcon.png (Recommended)](#3-defaulticonpng-recommended)
10
+ - [4. iOS Icons](#4-ios-icons)
11
+ - [App Icons](#app-icons)
12
+ - [Spotlight \& Settings Icons](#spotlight--settings-icons)
13
+ - [iOS Splash Screens](#ios-splash-screens)
14
+ - [iTunes Artwork (Ad-Hoc builds)](#itunes-artwork-ad-hoc-builds)
15
+ - [iTunes Connect Requirements](#itunes-connect-requirements)
16
+ - [5. Android Icons](#5-android-icons)
17
+ - [Launcher Icons](#launcher-icons)
18
+ - [Action Bar Icons](#action-bar-icons)
19
+ - [Notification Icons](#notification-icons)
20
+ - [Google Play Requirements](#google-play-requirements)
21
+ - [6. Android Splash Screens](#6-android-splash-screens)
22
+ - [Android 12+ (SDK 12.0.0+)](#android-12-sdk-1200)
23
+ - [Android \< 12 (Legacy)](#android--12-legacy)
24
+ - [Nine-Patch Images (Recommended)](#nine-patch-images-recommended)
25
+ - [Density-Specific Splash Screens](#density-specific-splash-screens)
26
+ - [Custom Theme Splash Screen](#custom-theme-splash-screen)
27
+ - [7. Localized Splash Screens](#7-localized-splash-screens)
28
+ - [Android Localization](#android-localization)
29
+ - [iOS Localization](#ios-localization)
30
+ - [8. Adaptive Icons (Android 8.0+)](#8-adaptive-icons-android-80)
31
+ - [9. Common Issues](#9-common-issues)
32
+ - [Build Fails - Missing Icons](#build-fails---missing-icons)
33
+ - [Android Splash Stretched/Distorted](#android-splash-stretcheddistorted)
34
+ - [iOS Icons Not Updating](#ios-icons-not-updating)
35
+ - [Android 12 Splash Not Showing Custom Image](#android-12-splash-not-showing-custom-image)
36
+ - [11. iOS Launch Files (Storyboards)](#11-ios-launch-files-storyboards)
37
+ - [Enabling Launch Storyboards](#enabling-launch-storyboards)
38
+ - [Customizing Background Color](#customizing-background-color)
39
+ - [Using Images in Storyboards](#using-images-in-storyboards)
40
+ - [Launch File Cache](#launch-file-cache)
41
+ - [Best Practices](#best-practices)
42
+
43
+ ---
44
+
45
+ ## 1. Overview
46
+
47
+ App icons and splash screens are required for app store submissions and provide visual branding during app launch.
48
+
49
+ **Tools for asset generation:**
50
+ - [TiCons website](http://ticons.fokkezb.nl/)
51
+ - [TiCons CLI](https://www.npmjs.org/package/ticons)
52
+ - [Android Asset Studio](https://romannurik.github.io/AndroidAssetStudio/index.html)
53
+
54
+ ## 2. Asset Locations
55
+
56
+ | Platform | Classic Project | Alloy Project |
57
+ | --------------- | --------------------------------------- | ----------------------------------------- |
58
+ | Shared | `Resources/` | `app/assets/` |
59
+ | iOS | `Resources/iphone/` or `Resources/ios/` | `app/assets/iphone/` or `app/assets/ios/` |
60
+ | Android | `Resources/android/` | `app/assets/android/` |
61
+ | Android density | `platform/android/res/drawable-*dpi/` | `app/platform/android/res/drawable-*dpi/` |
62
+
63
+ ## 3. DefaultIcon.png (Recommended)
64
+
65
+ Place a single `DefaultIcon.png` (1024x1024px) in project root. Titanium auto-generates all missing icon sizes.
66
+
67
+ **Requirements:**
68
+ - Square (equal height/width)
69
+ - No alpha channel
70
+ - PNG format
71
+ - At least 1024x1024px
72
+
73
+ ## 4. iOS Icons
74
+
75
+ ### App Icons
76
+
77
+ | Device | Dimensions | Filename |
78
+ | --------------- | ---------- | --------------------- |
79
+ | iPhone 4/5/6 | 120x120 | `appicon-60@2x.png` |
80
+ | iPhone 6 Plus+ | 180x180 | `appicon-60@3x.png` |
81
+ | iPad non-retina | 76x76 | `appicon-76.png` |
82
+ | iPad retina | 152x152 | `appicon-76@2x.png` |
83
+ | iPad Pro | 167x167 | `appicon-83.5@2x.png` |
84
+
85
+ ### Spotlight & Settings Icons
86
+
87
+ | Device | Purpose | Dimensions | Filename |
88
+ | -------------------- | --------- | ---------- | ------------------------- |
89
+ | Universal non-retina | Spotlight | 40x40 | `appicon-Small-40.png` |
90
+ | Universal retina | Spotlight | 80x80 | `appicon-Small-40@2x.png` |
91
+ | iPhone 6 Plus+ | Spotlight | 120x120 | `appicon-Small-40@3x.png` |
92
+ | Universal non-retina | Settings | 29x29 | `appicon-Small.png` |
93
+ | Universal retina | Settings | 58x58 | `appicon-Small@2x.png` |
94
+ | iPhone 6 Plus+ | Settings | 87x87 | `appicon-Small@3x.png` |
95
+
96
+ ### iOS Splash Screens
97
+
98
+ | Device | Dimensions | Filename |
99
+ | --------------------------------------- | ---------- | -------------------------------- |
100
+ | iPhone 4/4S | 640x960 | `Default@2x.png` |
101
+ | iPhone 5/5C/5S | 640x1136 | `Default-568h@2x.png` |
102
+ | iPhone 6/7/8 portrait | 750x1334 | `Default-667h@2x.png` |
103
+ | iPhone 6/7/8 landscape | 1334x750 | `Default-Landscape-1134@2x.png` |
104
+ | iPhone 6/7/8 Plus portrait | 1242x2208 | `Default-Portrait-736h@3x.png` |
105
+ | iPhone 6/7/8 Plus landscape | 2208x1242 | `Default-Landscape-736h@3x.png` |
106
+ | iPhone X/Xs portrait | 1125x2436 | `Default-Portrait-2436h@3x.png` |
107
+ | iPhone X/Xs landscape | 2436x1125 | `Default-Landscape-2436h@3x.png` |
108
+ | iPhone Xr portrait | 828x1792 | `Default-Portrait-1792h@2x.png` |
109
+ | iPhone Xr landscape | 1792x828 | `Default-Landscape-1792h@2x.png` |
110
+ | iPhone Xs Max portrait | 1242x2688 | `Default-Portrait-2688h@3x.png` |
111
+ | iPhone Xs Max landscape | 2688x1242 | `Default-Landscape-2688h@3x.png` |
112
+ | iPhone 12/13/14 portrait | 1170x2532 | `Default-Portrait-2532@3x.png` |
113
+ | iPhone 12/13/14 landscape | 2532x1170 | `Default-Landscape-2532@3x.png` |
114
+ | iPhone 12/13 Pro Max, 14 Plus portrait | 1284x2778 | `Default-Portrait-2778@3x.png` |
115
+ | iPhone 12/13 Pro Max, 14 Plus landscape | 2778x1284 | `Default-Landscape-2778@3x.png` |
116
+ | iPhone 14 Pro portrait | 1179x2556 | `Default-Portrait-2556@3x.png` |
117
+ | iPhone 14 Pro landscape | 2556x1179 | `Default-Landscape-2556@3x.png` |
118
+ | iPhone 14 Pro Max portrait | 1290x2796 | `Default-Portrait-2796@3x.png` |
119
+ | iPhone 14 Pro Max landscape | 2796x1290 | `Default-Landscape-2796@3x.png` |
120
+ | iPad non-retina landscape | 1024x768 | `Default-Landscape.png` |
121
+ | iPad non-retina portrait | 768x1024 | `Default-Portrait.png` |
122
+ | iPad retina landscape | 2048x1536 | `Default-Landscape@2x.png` |
123
+ | iPad retina portrait | 1536x2048 | `Default-Portrait@2x.png` |
124
+
125
+ ### iTunes Artwork (Ad-Hoc builds)
126
+
127
+ | Dimensions | Filename |
128
+ | ---------- | --------------------------------- |
129
+ | 512x512 | `iTunesArtwork` (no extension) |
130
+ | 1024x1024 | `iTunesArtwork@2x` (no extension) |
131
+
132
+ **Note:** Do not include in App Store builds.
133
+
134
+ ### iTunes Connect Requirements
135
+
136
+ | Purpose | Dimensions | Format |
137
+ | -------------- | --------------- | ------------------------ |
138
+ | Large app icon | 1024x1024 | JPG/PNG, no transparency |
139
+ | Screenshots | Device-specific | JPG/PNG, no transparency |
140
+
141
+ ## 5. Android Icons
142
+
143
+ ### Launcher Icons
144
+
145
+ | Density | DPI | Dimensions | Location |
146
+ | ------- | --- | ---------- | --------------------------------------------------- |
147
+ | ldpi | 120 | 36x36 | `platform/android/res/drawable-ldpi/appicon.png` |
148
+ | mdpi | 160 | 48x48 | `platform/android/res/drawable-mdpi/appicon.png` |
149
+ | hdpi | 240 | 72x72 | `platform/android/res/drawable-hdpi/appicon.png` |
150
+ | xhdpi | 320 | 96x96 | `platform/android/res/drawable-xhdpi/appicon.png` |
151
+ | xxhdpi | 480 | 144x144 | `platform/android/res/drawable-xxhdpi/appicon.png` |
152
+ | xxxhdpi | 640 | 192x192 | `platform/android/res/drawable-xxxhdpi/appicon.png` |
153
+
154
+ ### Action Bar Icons
155
+
156
+ | Density | Dimensions | Classic Location | Alloy Location |
157
+ | ------- | ---------- | --------------------------------------- | ---------------------------------------- |
158
+ | ldpi | 18x18 | `Resources/android/images/res-ldpi/` | `app/assets/android/images/res-ldpi/` |
159
+ | mdpi | 24x24 | `Resources/android/images/res-mdpi/` | `app/assets/android/images/res-mdpi/` |
160
+ | hdpi | 36x36 | `Resources/android/images/res-hdpi/` | `app/assets/android/images/res-hdpi/` |
161
+ | xhdpi | 48x48 | `Resources/android/images/res-xhdpi/` | `app/assets/android/images/res-xhdpi/` |
162
+ | xxhdpi | 72x72 | `Resources/android/images/res-xxhdpi/` | `app/assets/android/images/res-xxhdpi/` |
163
+ | xxxhdpi | 144x144 | `Resources/android/images/res-xxxhdpi/` | `app/assets/android/images/res-xxxhdpi/` |
164
+
165
+ ### Notification Icons
166
+
167
+ **Important:** Must be white-on-transparent background only.
168
+
169
+ Same density/location structure as action bar icons, but in `platform/android/res/drawable-*dpi/`.
170
+
171
+ ### Google Play Requirements
172
+
173
+ | Purpose | Dimensions | Format |
174
+ | --------------- | ---------- | ------------------- |
175
+ | Large app icon | 512x512 | PNG/JPG, max 1024KB |
176
+ | Screenshots | 320-3840px | PNG/JPG, no alpha |
177
+ | Feature graphic | 1024x500 | PNG/JPG, no alpha |
178
+ | Promotional | 180x120 | PNG/JPG, no alpha |
179
+
180
+ ## 6. Android Splash Screens
181
+
182
+ ### Android 12+ (SDK 12.0.0+)
183
+
184
+ Android 12 uses app icon as splash screen automatically. Use **Adaptive Icons** for best results.
185
+
186
+ **Customize splash background color via theme:**
187
+
188
+ ```xml
189
+ <!-- tiapp.xml -->
190
+ <android xmlns:android="http://schemas.android.com/apk/res/android">
191
+ <manifest>
192
+ <application>
193
+ <activity android:name="com.myapp.MyAppActivity"
194
+ android:theme="@style/Theme.Custom.Splash" />
195
+ </application>
196
+ </manifest>
197
+ </android>
198
+ ```
199
+
200
+ ```xml
201
+ <!-- platform/android/res/values/splash_theme.xml -->
202
+ <resources>
203
+ <style name="Theme.Custom.Splash" parent="@style/Theme.MaterialComponents.NoActionBar">
204
+ <item name="android:windowBackground">@drawable/background_splash</item>
205
+ <item name="android:windowSplashScreenBackground">@color/splash_bg</item>
206
+ </style>
207
+
208
+ <color name="splash_bg">#FF5722</color>
209
+ </resources>
210
+ ```
211
+
212
+ ```xml
213
+ <!-- platform/android/res/drawable/background_splash.xml -->
214
+ <?xml version="1.0" encoding="utf-8"?>
215
+ <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
216
+ <item android:drawable="@color/splash_bg"/>
217
+ <item>
218
+ <bitmap android:src="@drawable/splash_logo" android:gravity="center"/>
219
+ </item>
220
+ </layer-list>
221
+ ```
222
+
223
+ ### Android < 12 (Legacy)
224
+
225
+ Use `default.png` or nine-patch images.
226
+
227
+ #### Nine-Patch Images (Recommended)
228
+
229
+ Nine-patch images define stretchable regions for different screen sizes.
230
+
231
+ **Creating:**
232
+ 1. Create PNG with 1px transparent/white border
233
+ 2. Mark stretchable areas with black pixels on top/left borders
234
+ 3. Mark drawable areas with black pixels on right/bottom borders
235
+ 4. Name file with `.9.png` extension
236
+
237
+ **Usage:**
238
+ ```javascript
239
+ // Reference without .9 in code
240
+ const button = Ti.UI.createButton({
241
+ backgroundImage: '/images/myimage.png' // myimage.9.png on disk
242
+ });
243
+ ```
244
+
245
+ #### Density-Specific Splash Screens
246
+
247
+ ```
248
+ platform/android/res/
249
+ ├── drawable-ldpi/background.9.png
250
+ ├── drawable-mdpi/background.9.png
251
+ ├── drawable-hdpi/background.9.png
252
+ ├── drawable-xhdpi/background.9.png
253
+ ├── drawable-xxhdpi/background.9.png
254
+ ├── drawable-xxxhdpi/background.9.png
255
+ └── drawable-nodpi/background.9.png (universal fallback)
256
+ ```
257
+
258
+ **Warning:** Do not use `drawable/` (without suffix) - causes scaling issues. Use `drawable-nodpi/` for universal images.
259
+
260
+ #### Custom Theme Splash Screen
261
+
262
+ ```xml
263
+ <!-- platform/android/res/values/mytheme.xml -->
264
+ <?xml version="1.0" encoding="utf-8"?>
265
+ <resources>
266
+ <style name="Theme.MyTheme" parent="Theme.AppCompat">
267
+ <item name="windowBackground">@drawable/background</item>
268
+ <item name="android:windowBackground">@drawable/background</item>
269
+ </style>
270
+ </resources>
271
+ ```
272
+
273
+ ```xml
274
+ <!-- tiapp.xml - override root activity theme -->
275
+ <android xmlns:android="http://schemas.android.com/apk/res/android">
276
+ <manifest>
277
+ <application>
278
+ <activity android:name=".YourapplicationnameActivity"
279
+ android:theme="@style/Theme.MyTheme"
280
+ android:configChanges="keyboardHidden|orientation|screenSize">
281
+ <intent-filter>
282
+ <action android:name="android.intent.action.MAIN"/>
283
+ <category android:name="android.intent.category.LAUNCHER"/>
284
+ </intent-filter>
285
+ </activity>
286
+ </application>
287
+ </manifest>
288
+ </android>
289
+ ```
290
+
291
+ ## 7. Localized Splash Screens
292
+
293
+ ### Android Localization
294
+
295
+ Place images in `res-<lang>` folders:
296
+
297
+ ```
298
+ Resources/android/images/
299
+ ├── res-en/default.png
300
+ ├── res-es/default.png
301
+ ├── res-fr-long-land-hdpi/default.png
302
+ └── res-long-land-hdpi/default.png
303
+ ```
304
+
305
+ Localized images take precedence over non-localized.
306
+
307
+ ### iOS Localization
308
+
309
+ Place in `i18n/<lang>/` folder:
310
+
311
+ ```
312
+ i18n/
313
+ ├── en/
314
+ │ ├── Default@2x.png
315
+ │ └── Default-568h@2x.png
316
+ └── es/
317
+ ├── Default@2x.png
318
+ └── Default-568h@2x.png
319
+ ```
320
+
321
+ ## 8. Adaptive Icons (Android 8.0+)
322
+
323
+ Adaptive icons have foreground and background layers.
324
+
325
+ **Structure:**
326
+ ```
327
+ platform/android/res/
328
+ ├── mipmap-anydpi-v26/
329
+ │ └── appicon.xml
330
+ ├── drawable/
331
+ │ ├── ic_launcher_foreground.xml
332
+ │ └── ic_launcher_background.xml
333
+ ```
334
+
335
+ **appicon.xml:**
336
+ ```xml
337
+ <?xml version="1.0" encoding="utf-8"?>
338
+ <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
339
+ <background android:drawable="@drawable/ic_launcher_background"/>
340
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
341
+ </adaptive-icon>
342
+ ```
343
+
344
+ ## 9. Common Issues
345
+
346
+ ### Build Fails - Missing Icons
347
+
348
+ **Solution:** Add `DefaultIcon.png` (1024x1024) to project root for auto-generation.
349
+
350
+ ### Android Splash Stretched/Distorted
351
+
352
+ **Solution:** Use nine-patch images or `drawable-nodpi` folder.
353
+
354
+ ### iOS Icons Not Updating
355
+
356
+ **Solution:**
357
+ 1. Clean project
358
+ 2. Delete `build/` folder
359
+ 3. Rebuild
360
+
361
+ ### Android 12 Splash Not Showing Custom Image
362
+
363
+ **Solution:** Android 12+ uses app icon by default. Customize via theme's `windowSplashScreenBackground` only.
364
+
365
+ ## 11. iOS Launch Files (Storyboards)
366
+
367
+ Since iOS 8, Apple recommends using Launch Files (Storyboards) instead of multiple `Default*.png` images. This allows a single file to support all device sizes and slims down the IPA.
368
+
369
+ ### Enabling Launch Storyboards
370
+
371
+ In the `<ios>` section of `tiapp.xml`:
372
+
373
+ ```xml
374
+ <enable-launch-screen-storyboard>true</enable-launch-screen-storyboard>
375
+ ```
376
+
377
+ ### Customizing Background Color
378
+
379
+ Set a default background color for the launch screen and the gap before the first view opens:
380
+
381
+ ```xml
382
+ <default-background-color>#C7172C</default-background-color>
383
+ ```
384
+
385
+ ### Using Images in Storyboards
386
+
387
+ To use an image in a custom native Storyboard:
388
+ 1. Set the `Image` property of an *Image View* to the path under `app/assets/` without the extension or modifiers.
389
+ 2. **Important (App Thinning)**: If `use-app-thinning` is enabled, you must use the name of the generated asset catalog. This is a hash based on the image path.
390
+ - Build the app.
391
+ - Look up the `[hash].imageset` under `build/iphone/Assets.xcassets/`.
392
+ - Use that `[hash]` value in the Storyboard.
393
+
394
+ ### Launch File Cache
395
+
396
+ iOS caches launch screen snapshots. If changes aren't appearing:
397
+ 1. Reset Content and Settings in the Simulator.
398
+ 2. Run `ti clean` or Project > Clean.
399
+
400
+ ## Best Practices
401
+
402
+ 1. **Use DefaultIcon.png** for automatic icon generation
403
+ 2. **Use nine-patch** for Android splash screens
404
+ 3. **Test on multiple densities** especially Android
405
+ 4. **Keep icons simple** - Details lost at small sizes
406
+ 5. **No alpha channel** on app icons
407
+ 6. **Square icons only** - Equal width/height
408
+ 7. **Clean project** after icon changes
409
+ 8. **Use adaptive icons** for Android 8.0+