See related ticket. Currently the behavior in managing the app icons is different. This ticket has to address and make them consistent.
With the related ticket, a DefaultIcon.png WILL BE copied into the project's root when
alloy new
is run.
Test cases APPC CLI :
A. Brand new project via Appc. *appc new* *appc run -p ios*
B. *appc run -p ios -T dist-adhoc*
C. Scenario where DefaultIcon.png (use attached [^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). *appc run -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). *appc run -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). *appc run -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 [^defaultContent.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
Actual Result:
A. Build success. But the content of build->iphone->Assets.xcassets is inconsistent. [^appcdefaultContent.png] In tooling, we have to remove all the existing icons in the Resources folder so that DefaultIcon.png can do it's job.
PR: https://github.com/appcelerator/alloy/pull/722
APPROVED. PR 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 5.0.0-50 Ti CLI 5.0.1 Alloy 1.7.7 Arrow 1.2.48 Xcode 7.0 (7A218) Node v0.10.37 Java 1.7.0_45 preproduction App icons are successfully generated for Alloy 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.