Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19683] iOS build is getting failed with latest SDK

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-10-08T07:45:36.000+0000
Affected Version/sRelease 5.1.0
Fix Version/sRelease 5.1.0
ComponentsiOS, Tooling
Labelsn/a
ReporterKondal Kolipaka
AssigneeChris Barber
Created2015-10-07T09:09:31.000+0000
Updated2015-10-13T21:02:34.000+0000

Description

iOS build is getting failed with latest SDK 5.1.0.v20151006222951 Please find the error below from studio.
[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
[ERROR] :  An error occurred during build after 6s 794ms
[ERROR] :  DefaultIcon.png cannot be used because it contains an alpha channel
TRACE  | titanium exited with exit code 1
ERROR  | Error: ti run exited with error code 1
    at ChildProcess.<anonymous> (/Users/kkolipaka/.appcelerator/install/5.0.2/package/node_modules/appc-cli-titanium/plugins/run.js:89:66)
    at ChildProcess.emit (events.js:117:20)
    at Process.ChildProcess._handle.onexit (child_process.js:820:12)

Attachments

FileDateSize
log.txt2015-10-07T09:08:27.000+000014520

Comments

  1. Chee Kiat Ng 2015-10-07

    This was done with appc run. I think we have to check the DefaultIcon.png packaged inside Alloy and inside Ti. [~cbarber] right?
  2. Chris Barber 2015-10-07

    Yeah, the DefaultIcon.png in Alloy has an alpha channel: https://github.com/appcelerator/alloy/blob/master/templates/DefaultIcon.png We really need to figure out a way to remove the alpha channel from images. This means if you have an image with an alpha channel, then the iOS build would COPY the image to the build dir, then remove the alpha channel, then embed the image in the asset catalog. I'm not sure the best way to do that. Perhaps there's a Node module that will do it? We should probably add this functionality to node-appc's image library so that we can reuse it. As far as this ticket is concerned, while the issue is caused by Alloy, it's ultimately because of a bug in the iOS build, so we should probably fix it in the SDK.
  3. Chris Barber 2015-10-08

    Decided to add support for platform specific default icons. For iOS, it will look for DefaultIcon-ios.png, followed by DefaultIcon-iphone.png and finally DefaultIcon.png. PR: https://github.com/appcelerator/titanium_mobile/pull/7279
  4. Chee Kiat Ng 2015-10-08

    Test Cases

    1. Only DefaultIcon.png has alpha channel. 2. DefaultIcon.png(with alpha) + DefaultIcon-ios.png(without alpha) 3. DefaultIcon.png(with alpha) + DefaultIcon-ios.png(with alpha)

    Expected Result

    1.
       [ERROR] /Users/kiat/titaniumTestWatch/SGTestPNG/DefaultIcon.png cannot be used because it contains an alpha channel
       [ERROR] Create a image named "DefaultIcon-ios.png" in the root of your project
       [ERROR] It is highly recommended that the DefaultIcon.png be 1024x1024
       
    2. Builds with no issues 3. Same error as 1. CR and FT passed. Merging PR.
  5. Chee Kiat Ng 2015-10-08

    [~bhatfield], need you help to put in a document or guide somewhere that says: 1. Apple doesn't accept app icons with alpha channels. 2. Ti developers either have no alpha channel in their DefaultIcon.png across platforms, or 3. Ti developers can have DefaultIcon.png with alpha channel, and another version without named as DefaultIcon-ios.png or DefaultIcon-iphone.png
  6. Eric Wieber 2015-10-13

    Verified fixed, using: MacOS 10.11 (15A284) Studio 4.3.2.201510082315 Ti SDK 5.1.0.v20151009204425 Appc NPM 4.2.1-1 Appc CLI 5.1.0-38 Ti CLI 5.0.5 Alloy 1.7.16 Arrow 1.3.13 Xcode 7.0.1 (7A1001) Node v0.10.37 Java 1.7.0_80 preproduction Scenarios tested: 1. DefaultIcon.png with alpha 2. DefaultIcon.png without alpha 3. DefaultIcon.png with alpha, DefaultIcon-ios.png without alpha 4. DefaultIcon.png with alpha, DefaultIcon-ios.png with alpha Scenarios 1 and 4 failed with the expected error (above). Scenarios 2 and 3 successfully built without error.

JSON Source