[ALOY-1318] DefaultIcon(-platform).png should be theme-able

GitHub Issuen/a
TypeNew Feature
Resolution Date2017-10-23T11:45:38.000+0000
Affected Version/salloy 1.7.17
Fix Version/sCLI Release 6.3.0
ReporterFokke Zandbergen
AssigneeFeon Sua Xin Miao


The new /DefaultIcon.png which has platform specific versions at /DefaultIcon-<platform>.png should be theme-able via Alloy. We probably need a similar approach as with i18n and platform since we can't overwrite the DefaultIcon.png in the project root, so we have to do it at build-time. - https://github.com/appcelerator/alloy/pull/662/files#diff-ddbdb7300fa15590afdfee9246ac61fcR327 - https://github.com/appcelerator/alloy/pull/662/files#diff-6487ccfa4909144bbc33134e4d85bdddR159 Kindly pointed out by [~jasonkneen]: https://twitter.com/jasonkneen/status/654326054488834048


  1. Fokke Zandbergen 2015-10-14 /CC [~cbarber] [~fmiao]
  2. Tim Poulsen 2015-10-14 I believe the context for the request was Alloy-themable. Not Android themes as stated in the description.
  3. Jason Kneen 2015-10-14 Yes Alloy themable since auto-generating icons from DefaultIcon.png is a new feature for iOS (I believe).
  4. Fokke Zandbergen 2015-10-14 Typo :)
  5. Ricardo Pereira 2015-12-14 I think that not only DefaultIcon, but GooglePlay, GooglePlayFeature, iTunesConnect, MarketplaceArtwork and MarketplaceArtworkFeature png image files on root folder, also should be theme-able. ex: app/themes/mytheme/GooglePlay.png app/themes/othertheme/MarketplaceArtwork.png
  6. Fokke Zandbergen 2015-12-14 [~ricardo_jcp] those don't end up in the app itself so sure - you can keep them in the theme folder and select from there as you work in iTunesConnect and Goole Play.
  7. Ricardo Pereira 2015-12-14 Ok, so the only root image used while compiling it's the DefaultIcon?
  8. Fokke Zandbergen 2015-12-14 Correct, the others you list are for you to upload manually to iTunesConnect and Google Play.
  9. Ricardo Pereira 2015-12-14 Ok, thanks, just one more doubt, what about android platform resolution icons? ex: platform/android/res/drawable-hdpi
  10. Fokke Zandbergen 2015-12-14 Those can already be themed. Just have a platform folder in your theme folder.
  11. Uriel Lizama 2015-12-18 Is there any roadmap for this?
  12. Feon Sua Xin Miao 2015-12-18 Hello [~ulizama], we are working on it! :)
  13. Uriel Lizama 2016-02-22 Hello, It's been a couple of months without a solution for this issue. Is there a timeframe on when this is going to be addressed? Can you suggest a workaround in the meantime? I have a project where I have about 12 different themes which are completely different apps, so I need each to have their own icon. This has made using the newer SDKs really hard as I have to do manual work before I compile. Thanks
  14. Jerod Fritz 2016-02-22 I have the same situation. I manually copy the DefaultIcon.png to project root from the the theme folder where I store it temporarily. Would really like to have the current theme folder included in the search path. I've deployed the wrong icon a handful of times now just by forgetting that step.
  15. Chris Barber 2016-02-22 Thanks for the bump guys. We're looking into this. Just need to figure out who will and when implement this.
  16. Jason Kneen 2016-02-22 Added support in TiTh for this as a workaround https://github.com/jasonkneen/tith
  17. Jerod Fritz 2016-02-22 Support for this is available on Jason's TiCh as well here https://github.com/jasonkneen/TiCh
  18. Fokke Zandbergen 2016-03-23 [~cbarber] I guess we can do this similar as ALOY-1365 now, by moving DefaultIcon.png into the app folder for Alloy?
  19. Chris Barber 2016-03-23 [~fokkezb] Sure. I don't have the bandwidth to fix it right now. If you have the time, send a fix and I'll test/merge.
  20. Ricardo Pereira 2017-01-08 Any plans on this ticket?
  21. Feon Sua Xin Miao 2017-08-24 PR: https://github.com/appcelerator/alloy/pull/844 For themed project, app/themes/<theme>/DefaultIcon.png will be copied to project root by alloy compile. If theme doesn't exist or no theme is configured, app/DefaultIcon.png will be copied. This does require existing apps to move DefaultIcon.png from project root to /app directory.
  22. Abir Mukherjee 2017-10-10 Passed validation using Alloy 1.10.5 Node Version: 6.10.3 NPM Version: 3.10.10 Mac OS: 10.13 Appc CLI: 6.3.0-master.7 Appc CLI NPM: 4.2.9 I followed the instruction here: http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes
  23. Feon Sua Xin Miao 2017-10-20 PR: https://github.com/appcelerator/alloy/pull/856 Update to not break current usage. 1. Exiting apps, default icons exist under project root, no change. 2. To use the new feature, enable theme under app/config.json, add default icons under app/themes/<theme>. *Test Steps* 1. Create an app, default icons exists under project root, alloy compile shouldn't error out, note the default icon use. 2. Add theme to the app, do no app default icon under theme, alloy compile shouldn't error out, default icon used should be the same as in step 1. 3. Add default icon to theme, alloy compile shouldn't error out, default icon under selected theme is used. 4. Add another theme with default icon, select the new theme, alloy compile shouldn't error out, default icon under selected theme is used. 5. Disable theme, alloy compile shouldn't error out, default icon used should be the same as in step 1.
  24. Abir Mukherjee 2017-10-23 FR passed. PR merged, and changes are seen in CLI 6.3.0-master.16.
  25. Creative 2018-02-28 hi, why isnt this documented anywhere? I have no clue what the compiler does now with a file in app/DefaultIcon.png or /DefaultIcon.png or app/themes/mytheme/DefaultIcon.png. In additon, why does every change to Alloy or Titanium have to be backwards compatible? It introduces so much scenario specific code that it will likely create bugs.
  26. Creative 2018-02-28 Odd behaviour: - Have the file /app/themes/mytheme/DefaultIcon.png - Have no /app/DefaultIcon.png or /DefaultIcon.png in your project - Use "mytheme" as the app theme in app/config.json - Run appc ti build ... - On the first compile, a /DefaultIcon.png seems to be copied - On the second compile (right after the first), a /app/DefaultIcon.png seems to be copied

JSON Source