Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19707] iOS: Error: "DefaultIcon.png cannot be used because it contains an alpha channel"

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-10-28T01:21:18.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.1.0
ComponentsCLI, iOS
Labelsn/a
ReporterJeff Haynie
AssigneeChris Barber
Created2015-10-09T23:35:05.000+0000
Updated2015-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)

Comments

  1. Ingo Muschenetz 2015-10-21

    This cannot break the build. We should remove the alpha channel: http://stackoverflow.com/questions/25681869/images-cant-contain-alpha-channels-or-transparencies
  2. Chris Barber 2015-10-23

    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.
  3. Chris Barber 2015-10-23

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/7339 5_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/7340
  4. Feon Sua Xin Miao 2015-10-23

    PR merged.
  5. Harry Bryant 2015-10-27

    Verified as fixed, followed the provided steps and was able to build and launch app successfully:
       INFO]  Analyzing CommonJS modules
       [INFO]  Creating asset catalog
       [INFO]  Creating app icon set
       [WARN]  Skipping Resources/iphone/appicon-60@2x.png because app icons must not have an alpha channel
       [WARN]  Skipping Resources/iphone/appicon-60@3x.png because app icons must not have an alpha channel
       [WARN]  Skipping Resources/iphone/appicon-76.png because app icons must not have an alpha channel
       [WARN]  Skipping Resources/iphone/appicon-76@2x.png because app icons must not have an alpha channel
       [WARN]  Skipping Resources/iphone/appicon-Small-40.png because app icons must not have an alpha channel
       [WARN]  Skipping Resources/iphone/appicon-Small-40@2x.png because app icons must not have an alpha channel
       [WARN]  Skipping Resources/iphone/appicon-Small.png because app icons must not have an alpha channel
       [WARN]  Skipping Resources/iphone/appicon-Small@2x.png because app icons must not have an alpha channel
       [WARN]  The default icon "/Users/harrybryant/Documents/Appcelerator_Studio_Workspace/timob_19707/DefaultIcon.png" contains an alpha channel which is not supported by iOS
       [WARN]  The image will be flattened against a white background
       [WARN]  You may create an image named "DefaultIcon-ios.png" that does not have an alpha channel in the root of your project
       [WARN]  It is highly recommended that the DefaultIcon.png be 1024x1024
       [INFO]  Creating launch image set
       [INFO]  App thinning disabled, skipping asset image sets
       [INFO]  Processing JavaScript files
       [INFO]  Writing app properties
       [INFO]  Writing i18n files
       [INFO]  Processing Titanium symbols
       [INFO]  Removing files
       [INFO]  Invoking xcodebuild
       [INFO]  Finished building the application in 32s 356ms
       [INFO]  Launching iOS Simulator
       -- Start simulator log -------------------------------------------------------
       [INFO]  Application started
       [INFO]  timob_19707/1.0 (5.1.0.c914b0f)
       
    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.*
  6. Wilson Luu 2015-10-27

    Reopening to correct ticket description.
  7. Ingo Muschenetz 2015-10-28

    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.
  8. Wilson Luu 2015-10-28

    Closing ticket as per above comments.

JSON Source