[TIMOB-19509] DefaultIcon.png needs to support platform specific versions
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 5.0.0 |
Fix Version/s | n/a |
Components | Android, CLI, iOS, Windows |
Labels | cb-tooling |
Reporter | Fokke Zandbergen |
Assignee | Chris Barber |
Created | 2015-09-14T14:57:03.000+0000 |
Updated | 2020-01-30T10:56:19.000+0000 |
Description
TIMOB-19477 has introduced a new
/DefaultIcon.png
to generate all iOS icons from.
https://github.com/appcelerator/titanium_mobile/blob/5_0_X/node_modules/titanium-sdk/lib/builder.js#L385
There are tickets to do the same for other platforms.
TIMOB-19485, TIMOB-19486, TIMOB-19487
There are differences in icon guidelines and requirements between platforms:
- iOS requires 24-bit (no alpha)
- Other platforms support 32-bit (with alpha) and some ([Android](https://www.google.com/design/spec/style/icons.html)) actively promoot using transparency to produce unique icon shapes
Take our 4.1.0 sample app:
* https://github.com/appcelerator-developer-relations/appc-sample-ti410/blob/master/app/assets/iphone/appicon.png
* https://github.com/appcelerator-developer-relations/appc-sample-ti410/blob/master/platform/android/res/drawable-hdpi/appicon.png
To support this we need optional platform-specific versions of DefaultIcon.png
. Since the icon itself should not be packaged with the app, the platform specific icons should reside under:
* /platforms/<platform>/DefaultIcon.png
If this icon does not exist for the target platform it should look for /DefaultIcon.png
Additionally, validation of specific platform requirements could be added like TIMOB-19512 requests for 24-bit on iOS.
DefaultIcon.png will continue to live in the project root, but this ticket is meant to add a platform specific override from the
<project-dir>/platform/<platform>/DefaultIcon.png
file. This logic should be added to totitanium_mobile/node_modules/titanium-sdk/lib/builder.js
in thegenerateAppIcons()
function (https://github.com/appcelerator/node-titanium-sdk/blob/master/lib/builder.js#L408). It should check for the platform specific DefaultIcon.png, then if that doesn't exist, fall back to the one in the project root before failing out.