generator-m-ionic icon indicating copy to clipboard operation
generator-m-ionic copied to clipboard

XCode gives compile error if I add icons

Open dkarchmer opened this issue 9 years ago • 8 comments

If I add the icons to the config.xml:

<platform name="android">
        <allow-intent href="market:*" />
        <icon src="res/android/default/icon.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon src="res/ios/default/icon.png" />
    </platform>

and run gulp --cordova "run ios"

/.../platforms/ios/IOTile-M/Images.xcassets: The app icon set named "AppIcon" did not have any applicable content.

if I open Xcode, and go to the Icon page, I see all icons there (minus the iwatch ones), but also see in the button an icon-60.png with a (unassigned) label. But removing it did not work.

I also see that all icons give an xcode warning:

file:///.../platforms/ios/IOTile-M/Images.xcassets/: warning: Ambiguous Content: AppIcon.appiconset/icon-small.png is 640x640 but should be 29x29.

(You should use imagemagick or something to resize).

Any idea what the problem is?

dkarchmer avatar Jul 09 '16 17:07 dkarchmer

I have to delete the AppIcon from within xcode and recreate, and then add icons manually to get it to work

dkarchmer avatar Jul 09 '16 18:07 dkarchmer

cordova v6.2.0

$ gulp --cordova "platform add ios"
...
iOS project created with [email protected]

dkarchmer avatar Jul 09 '16 18:07 dkarchmer

I think the problem is, that this icon there has not the correct name and resolution for an app-icon. The icons in the folder are for demo only.

But I get the point. @gruppjo maybe we can add an icon with the correct name/resolution containing our new logo? Using the Ionic-cli feature for generating icons/splash screens could also be an option.

MathiasTim avatar Jul 11 '16 08:07 MathiasTim

This is a problem with the Cordova CLI or rather the current Cordova iOS platforms that I've been able to track down recently: https://cordova.apache.org/news/2016/01/28/tools-release.html#comment-2490358811

gruppjo avatar Jul 13 '16 12:07 gruppjo

I have a cordova project with a config.xml that has a single icon spec that builds beautifully on android. Having just installed XCode (because one has to, but I'm not using it) and running this command: cordova build ios I'm also getting the error mentioned above:

..../platforms/ios/.../Images.xcassets: error: The app icon set named "AppIcon" did not have any applicable content.

I was hoping that I would be able to use the cordova CLI (version 6.3.1) for building both Android apps and iOS apps. At this stage I don't know what to do.

RikdeBoer avatar Aug 27 '16 02:08 RikdeBoer

Hi @RikdeBoer, some people are solving this problem by downgrading the ios platform to v3.x or manually adding their icons in Xcode. No fix from cordova at this point, apparently!

gruppjo avatar Aug 29 '16 11:08 gruppjo

Any update on this?

Ajaxy avatar Feb 15 '17 14:02 Ajaxy

I have to delete the AppIcon from within xcode and recreate, and then add icons manually to get it to work

Can you explain how did you do that ?

adnanafzal565 avatar Oct 11 '19 21:10 adnanafzal565