Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codesign error with Flutter on iOS

Tags:

ios

flutter

dart

So I have been trying to get into Flutter recently and I am having issues. When I create a new project and do flutter run it works just fine. If I completely close the application and re-run the app I get this error every time.

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
    /Users/zachstarnes/Documents/code/test_proj/build/ios/Debug-iphonesimulator/Runner.app: resource fork, Finder information, or similar detritus not allowed
    Command /usr/bin/codesign failed with exit code 1
Could not build the application for the simulator.
Error launching application on iPhone X.

I have no idea how to fix this. I tried opening the xcode project file and signing the project to my organization and rerun but that still does not change the outcome. Any ideas of what I need to do to fix this?

like image 690
Zach Starnes Avatar asked Apr 02 '18 13:04

Zach Starnes


People also ask

Does Flutter work on iOS?

Flutter is designed to support mobile apps that run on both Android and iOS, as well as interactive apps that you want to run on your web pages or on the desktop.

Can you publish a Flutter app on iOS?

Build and upload your applicationFrom the command line, run flutter build ios. Select Product > Scheme > Runner. Select Product > Destination > Generic iOS Device. Select Product > Archive to produce a build archive.


2 Answers

So after a long time if finally figured out how to fix it.

The way I was able to fix is to delete the build directory in the root of your flutter project. The folder just gets rebuilt without the files causing the problem.

I assume it has something to do with forking the fonts/images I was adding to the project.

Edit (6/4/2019) You can also use flutter clean and it will also solve the issue. Stated by @Luke Stanyer below!

like image 53
Zach Starnes Avatar answered Oct 02 '22 18:10

Zach Starnes


Run

 flutter clean

in your command line.

like image 23
Luke Stanyer Avatar answered Oct 02 '22 18:10

Luke Stanyer