Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run app with single icon configuration #1145

Open
3 tasks done
Birowsky opened this issue Jan 7, 2021 · 9 comments
Open
3 tasks done

Can't run app with single icon configuration #1145

Birowsky opened this issue Jan 7, 2021 · 9 comments

Comments

@Birowsky
Copy link

Birowsky commented Jan 7, 2021

Bug Report

Problem

cordova run ios fails after adding <icon src="resources/icon.png" /> to config.xml. I've provided the resources/icon.png file, relative to the Cordova project root.

CLI error message:

The following build commands failed:
..../cordova/platforms/ios/build/emulator/TheWorkoutApp.app ..../cordova/platforms/ios/TheWorkoutApp/Images.xcassets
(1 failure)
xcodebuild: Command failed with exit code 65
error Command failed with exit code 65.

Environment, Platform, Device

cordova 10.0.0
cordova-ios 6.1.1
Mac 11.1 (intel)

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@timbru31 timbru31 transferred this issue from apache/cordova Jan 8, 2021
@breautek
Copy link
Contributor

breautek commented Jan 8, 2021

iOS doesn't support a single-icon configuration. You must provide icons of different sizes. These icons are used by the OS in different scenarios. The OS expects these icons to be precisely in specific resolutions with specific filenames.

Useful Links:

Closing as not a bug / won't fix.

@breautek breautek closed this as completed Jan 8, 2021
@Birowsky
Copy link
Author

Birowsky commented Jan 8, 2021

Oh, I was just following the documentation here which says:

The following configuration can be used to define a single default icon which will be used for all platforms.

<icon src="res/icon.png" />

@breautek
Copy link
Contributor

breautek commented Jan 8, 2021

I guess that warrants reopening this to at least investigate what is correct.

Using a single icon definitely shouldn't be recommended though. There is reasons why platforms expects specific sizes.

@breautek breautek reopened this Jan 8, 2021
@Birowsky
Copy link
Author

Birowsky commented Jan 8, 2021

They certainly do, but as you might know, when working natively, they provide tools to generate all other icons variants based on a single one.

If Cordova would do that for all platforms, that'd be bery bery nice : )

@dpogue
Copy link
Member

dpogue commented Jan 8, 2021

You must provide all the icons sizes that iOS requires. The docs are incorrect about being able to specify a single icon.

While it would be great for Cordova to automatically generate icons, that's a lot of code to test and maintain and update every time Apple changes their requirements, and I don't realistically think we should take on that additional maintenance burden.

@breautek
Copy link
Contributor

breautek commented Jan 8, 2021

While it would be great for Cordova to automatically generate icons, that's a lot of code to test and maintain and update every time Apple changes their requirements, and I don't realistically think we should take on that additional maintenance burden.

There are already third-party tools that does just this as well. Ionic maintains a tool which appears to be relatively up to date:
https://www.npmjs.com/package/cordova-res

@Birowsky
Copy link
Author

Birowsky commented Jan 8, 2021

I understand, folks. I'd rather have you focus on substantial things. I guess this issue boils down to adjusting the docs a bit.

@breautek
Copy link
Contributor

I understand, folks. I'd rather have you focus on substantial things. I guess this issue boils down to adjusting the docs a bit.

Agreed, I'll move this issue over to our docs repo.

@breautek breautek transferred this issue from apache/cordova-ios Jan 11, 2021
@bex-buri
Copy link

I guess that warrants reopening this to at least investigate what is correct.

Using a single icon definitely shouldn't be recommended though. There is reasons why platforms expects specific sizes.

I spent so much time on this only to find out the documentation hasn't been updated in 3 years. It's still up there saying you can use a single icon for both platforms and IOS keeps complaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants