0

I just downloaded Xcode 11.4 and the simulator won't work when I add my image (it's a gif) to 'assets:' in pubspec.yaml Here is my throwback:

Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
Xcode build done.                                           35.3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/scrabbleknight/Downloads/swift-master/build/ios/Debug-iphonesimulator/Runner.app: resource fork, Finder information, or similar detritus not allowed
    Command CodeSign failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro.
James Piner
  • 199
  • 1
  • 4
  • 17
  • Is this happen only with Xcode? What about Android? – i6x86 Mar 31 '20 at 00:06
  • It comes from Flutter, but it's an Xcode problem, as my Android emulators are all running smooth. I figured out it was only happening to images that were a gif and nothing else I added to my assets file. I'm assuming Flutter has an issue with uploading gifs as files in pubspec. – James Piner Mar 31 '20 at 03:26
  • Look if one of these can fix it https://stackoverflow.com/questions/39652867/code-sign-error-in-macos-high-sierra-xcode-resource-fork-finder-information – i6x86 Mar 31 '20 at 03:49

1 Answers1

0

SOLUTION

Hey i had this issue for the longest time and after several debugging methods. one worked for me when i cleaned the build and ran with XCode 11.4.1.

My setup; Xcode: 11.4.1 MacOS: Catalina 10.15.4

Step 1: Pubspec.yaml -- i specified the path of my image to assests/images/"image_name"."image_format".

Step 2: Pubspec.yaml -- i used to use "assets: -images" to declare all the images but i listed them out individually.

Step 3: In my code i used "Image(image: AssetImage())" to pull the images instead of images.asset()

Step 4: I believe this was the most important part. The image you use is possibly what causes the error when i used a large PNG file(702KB) i kept getting the error but when i used an JPG(141KB) my app ran on my device without any errors. PS: I have other smaller PNG files(75KB and 15KB) in my pupspec and they don't give any issues.

Dan
  • 1