[TIMOB-19683] iOS build is getting failed with latest SDK
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-10-08T07:45:36.000+0000 |
Affected Version/s | Release 5.1.0 |
Fix Version/s | Release 5.1.0 |
Components | iOS, Tooling |
Labels | n/a |
Reporter | Kondal Kolipaka |
Assignee | Chris Barber |
Created | 2015-10-07T09:09:31.000+0000 |
Updated | 2015-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
File | Date | Size |
---|---|---|
log.txt | 2015-10-07T09:08:27.000+0000 | 14520 |
This was done with appc run. I think we have to check the DefaultIcon.png packaged inside Alloy and inside Ti. [~cbarber] right?
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.
Decided to add support for platform specific default icons. For iOS, it will look for
DefaultIcon-ios.png
, followed byDefaultIcon-iphone.png
and finallyDefaultIcon.png
. PR: https://github.com/appcelerator/titanium_mobile/pull/7279Test 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.2. Builds with no issues 3. Same error as 1. CR and FT passed. Merging PR.
[~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
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.