[TIMOB-19477] Add support for DefaultIcon.png to generate missing app icons/artwork
GitHub Issue | n/a |
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-09-11T00:30:41.000+0000 |
Affected Version/s | Release 5.0.0 |
Fix Version/s | Release 5.0.0 |
Components | Tooling |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2015-09-08T18:46:17.000+0000 |
Updated | 2016-02-23T08:21:45.000+0000 |
Description
With the introduction of Asset Catalog support for app icons for iOS 9, we no longer use the appicon.png and appicon@2x.png images other than to resize them to generate missing images.
Furthermore, it build now requires appicon.png or appicon@2x.png to be at least 180x180 pixels.
Since this is sort of awkward change of behavior, it would be better to introduce a new image called "DefaultIcon.png" that we use to generate all missing icons as well as the iTunesArtwork for iOS builds.
Initially this would be implemented for iOS. Android, Windows, and Mobile Web support would be implemented in different tickets.
Since the DefaultIcon.png should not be apart of a built app, it must not go in the Resources directory and thus shall be searched for in the project root directory.
Attachments
Master PR: https://github.com/appcelerator/titanium_mobile/pull/7157 5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7158
Test cases Titanium CLI:
A. Brand new project via Ti, *ti create*, *ti build -p ios* B. *ti build -p ios -T dist-adhoc* C. Scenario where DefaultIcon.png (use [^DefaultIcon.png] in ticket), and ALL icons described [here](http://docs.appcelerator.com/platform/latest/#!/guide/Icons_and_Splash_Screens) exists, but are different from DefaultIcon.png. (This is the situation when a user decide to IGNORE the DefaultIcon.png and have his very own other icons). *ti build -p ios* D. Scenario where DefaultIcon.png is missing, but ALL icons described [here](http://docs.appcelerator.com/platform/latest/#!/guide/Icons_and_Splash_Screens) exists. (This is the situation when a user updates an existing project to the latest SDK). *ti build -p ios* E. Scenario where DefaultIcon.png is missing, but SOME icons described [here](http://docs.appcelerator.com/platform/latest/#!/guide/Icons_and_Splash_Screens) are missing. (This is the situation when a user updates an existing project with missing icons to the latest SDK). *ti build -p ios*Expected Results:
A. Build success. See inside build->iphone->Assets.xcassets and see these files [^defaultContent.png] B. Build success. See inside build->iphone->build->Products->Release-iphoneos->SGIcon.app->Show Package Content, there's the iTunesArtwork.png and iTunesArtwork@2x.png C. Build success. User's icons should be prioritized over the use of DefaultIcon.png. See inside build->iphone->Assets.xcassets and see these files [^withDefaultAndAllIcons.png] D. Build success. See inside build->iphone->Assets.xcassets and see these files [^withDefaultAndAllIcons.png] E. Build Fail. See error promptReviewed and Tested. Approved and merging master PR first.
Master PR 2: https://github.com/appcelerator/titanium_mobile/pull/7163
PRs approved and merged.
Verified implemented, using: MacOS 10.11 (15A279b) Studio 5.0.0.201508271032 Ti SDK 5.0.0.v20150910192021 Appc NPM 4.2.0-1 Appc CLI 4.1.3-9 Ti CLI 4.0.1 Alloy 1.6.2 Arrow 1.2.48 Xcode 7.0 (7A218) Node v0.10.37 Java 1.7.0_45 production App icons are successfully generated for classic projects, user specified icons are used over the generated icons, and errors are correctly thrown if DefaultIcon.png and user icons are missing, when required.