Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target debug_ios_bundle_flutter_assets failed:

Tags:

ios

flutter

Having trouble creating IOS app using flutter. can any one help how i can solve this issue??

Launching lib/main.dart on iPhone 14 Pro in debug mode... Running Xcode build... Xcode build done. 7.7s Failed to build iOS app Error (Xcode): Target debug_ios_bundle_flutter_assets failed: Exception: Failed to codesign /Users/vijaidwivedi/Projects/users/build/ios/Debug-iphonesimulator/App.framework/App with identity -.

Could not build the application for the simulator. Error launching application on iPhone 14 Pro.

Tried deleting the build directory cleaning the flutter app updating the app pubs

but no avail.

like image 540
dvijai Avatar asked Apr 18 '26 07:04

dvijai


2 Answers

Open Runner in Xcode then Go to Targets > Build Phases > Run Script: Add the following

xattr -cr ~/Library/Developer/Xcode/DerivedData || echo Clear

Then build the project.

like image 55
Mathew Avatar answered Apr 20 '26 21:04

Mathew


2025

The real issue is hidden in the xCode build logs.

Finder information not allowed

The real error:

Finder information, or similar detritus not allowed

This means that there are some metadata attributes in one of your image files that xcode doesn't like.

To fix this, you can run the command listed in this answer to remove the metadata from your project's images:

find . -type f -name '*.png' -exec xattr -c {} \;

Or for all images:

  find . -type f -name '*.jpeg' -exec xattr -c {} \;
  find . -type f -name '*.jpg' -exec xattr -c {} \;
  find . -type f -name '*.png' -exec xattr -c {} \;
  find . -type f -name '*.json' -exec xattr -c {} \;
like image 41
Joe Muller Avatar answered Apr 20 '26 21:04

Joe Muller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!