Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19477] Add support for DefaultIcon.png to generate missing app icons/artwork

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-09-11T00:30:41.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sRelease 5.0.0
ComponentsTooling
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2015-09-08T18:46:17.000+0000
Updated2016-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

FileDateSize
defaultContent.png2015-09-10T10:47:38.000+0000107623
DefaultIcon.png2015-09-10T10:47:59.000+000091321
withDefaultAndAllIcons.png2015-09-10T10:47:38.000+0000108350
withDefaultandSomeMissingIcons.png2015-09-10T10:47:38.000+0000174871

Comments

  1. Chris Barber 2015-09-10

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/7157 5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7158
  2. Chee Kiat Ng 2015-09-10

    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 prompt
       [ERROR] There are missing app icons
       [ERROR] You must either create the missing icons below or create an image named "DefaultIcon.png" in the root of your project
       [ERROR] If the DefaultIcon.png image is present, the build will use it to generate all missing icons
       [ERROR] It is highly recommended that the DefaultIcon.png be 1024x1024
       [ERROR] Unable to create missing icons:
       [ERROR]   Resources/iphone/appicon-Small@3x.png - Used for iPhone - required size: 87x87
       [ERROR]   Resources/iphone/appicon-Small-40@3x.png - Used for iPhone - required size: 120x120
       [ERROR]   Resources/iphone/appicon-60@3x.png - Used for iPhone - required size: 180x180
       [ERROR] An error occurred during build after 2s 554ms
       
    Reviewed and Tested. Approved and merging master PR first.
  3. Chee Kiat Ng 2015-09-10

  4. Chris Barber 2015-09-10

    Master PR 2: https://github.com/appcelerator/titanium_mobile/pull/7163
  5. Chee Kiat Ng 2015-09-11

    PRs approved and merged.
  6. Eric Wieber 2015-09-11

    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.

JSON Source