Home > Enterprise >  Not being able to change the app icon in iOS using flutter launcher icon
Not being able to change the app icon in iOS using flutter launcher icon

Time:11-16

I tried to change the app icon from the package "https://pub.dev/packages/flutter_launcher_icons". I followed the steps written in the site and it did seem to have added the desired icons to the xcode. However the icon was like crashed when built. I came to realize that in xcode, in the assets, the target membership must be checked. So I did add the check mark in the target membership. This time it did read the icons in the xcode.

But i got another error, this time saying the following,

    error: Multiple commands produce '....../build/ios/Debug-dev-iphonesimulator/Runner.app/Assets.car':
    1) Target 'Runner' (project 'Runner') has compile command with input '...../ios/Runner/Assets.xcassets'
    2) That command depends on command in Target 'Runner' (project 'Runner'): script phase “[CP] Copy Pods Resources”

I have tried things written in the following site but with no results.

https://dev.to/kylefoo/xcode-12-new-build-system-warns-multiple-commands-produce-assets-car-56im

So can anybody please help me with it?

CodePudding user response:

Use Package: flutter_launcher_icons

  1. Setup the config file Add your Flutter Launcher Icons configuration to your pubspec.yaml

    dev_dependencies:
       flutter_launcher_icons: "^0.9.2"
    
    flutter_icons:
       android: "launcher_icon"
       ios: true
       image_path: "assets/icon/icon.png"
    
  2. Run the following command in terminal:

    flutter pub get
    flutter pub run flutter_launcher_icons:main -f pubspec.yaml
    
  3. Run the package
    After setting up the configuration, all that is left to do is run the package.

    flutter pub get
    flutter pub run flutter_launcher_icons:main
    

CodePudding user response:

Check this setting platform specific app icons cookbook

  • Related