[TIMOB-19707] iOS: Error: "DefaultIcon.png cannot be used because it contains an alpha channel"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-10-28T01:21:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.1.0 |
Components | CLI, iOS |
Labels | n/a |
Reporter | Jeff Haynie |
Assignee | Chris Barber |
Created | 2015-10-09T23:35:05.000+0000 |
Updated | 2015-10-28T18:15:00.000+0000 |
Description
To create:
* appc use 5.0.0
* install 5.0.0.GA
* appc new
* appc run
* appc ti clean
* Remove SDK version from tiapp.xml
* appc ti sdk install -d --branch 5_1_X 5.1.0.v20151021132025
* appc use 5.0.3
* appc run
*Actual:* The following error is returned:
[ERROR] : /Users/wluu/Documents/Appcelerator_Studio_Workspace/monkeyPre/DefaultIcon.png cannot be used because it contains an alpha channel
[ERROR] : Create an image named "DefaultIcon-ios.png" that does not have an alpha channel in the root of your project
[ERROR] : It is highly recommended that the DefaultIcon.png be 1024x1024
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous> (/Users/wluu/.appcelerator/install/5.1.0-38/package/node_modules/appc-cli-titanium/plugins/run.js:92:66)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
This cannot break the build. We should remove the alpha channel: http://stackoverflow.com/questions/25681869/images-cant-contain-alpha-channels-or-transparencies
Found a pure JS library that we can use. It does not properly compute the background color when removing the alpha channel, so I fixed it and submitted a PR: https://github.com/lukeapage/pngjs/pull/32.
Master PR: https://github.com/appcelerator/titanium_mobile/pull/7339 5_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/7340
PR merged.
Verified as fixed, followed the provided steps and was able to build and launch app successfully:
Mac OSX El Capitan 10.11 (15A284) Ti SDK: 5.0.0.GA & 5.1.0.v20151026164636 Appc NPM: 4.2.1-6 Appc CLI: 5.0.0 & 5.0.3 Ti CLI: 5.0.4 Xcode 7.1(7B91b) Node v0.12.7 production *Closing ticket.*
Reopening to correct ticket description.
Removed extraneous old build error log. This issue is meant to address the situation where a 5.0.0-era project fails for 5.0.3+. This is unacceptable as it is a patch-version update. The breaking change of requiring a DefaultIcon.png or complete icon sets from 4.X to 5.X is acceptable as it is a breaking version update.
Closing ticket as per above comments.