Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error (xcode): target debug_unpack_ios failed: exception: failed to codesign in Flutter and IOS

To fully understand and address the issue, it's important to read the entire text. If you've recently updated your macOS to version 14, Xcode 15 and are encountering the following error when using Flutter:

(Uncategorized (Xcode): Command CodeSign failed with a nonzero exit code)

enter image description here

Here's a breakdown of the problem:

  1. Running on Android Emulator: When attempting to run your application in Android Studio on an Android emulator, it functions without any issues.

  2. Running on Simulator (iOS): However, when you try to run the app on the iOS simulator, it fails to work.

  3. Running on Xcode: Surprisingly, if you open the application in Xcode and run it there, it functions correctly on the simulator. Yet, in Android Studio, the issue persists.

Many online solutions suggest accessing "Keychain Access > Login Certificates" and deleting all Apple certificates. You may have already tried these solutions on platforms like Stack Overflow and Apple communities, but they yielded no results.

like image 471
Yahya Abunada Avatar asked Dec 06 '25 09:12

Yahya Abunada


2 Answers

I had the same problem, I recently bought an M2. I saw that this error occurs because I am trying to run the file that is on icloud. enter image description here enter image description here

The way I found was to disable synchronization

enter image description here

But you can also solve it by creating a local folder

enter image description here

like image 53
Arley Souto Avatar answered Dec 07 '25 21:12

Arley Souto


I had similar weird codesign errors when compiling flutter in VSC on mac. This only started to occur when I upgraded to macOS Sonoma 1.40

So, this is how I fixed it:

First Issue: My flutter project was no longer compiling and running via VSC but it was when building within Xcode. Was getting code sign errors and compilation was failing. My project files was stored within iCloud Drive and sync was on. Solution: So I move entire project across to a local folder on my HD and that seems to fix that issue.

Second Issue: Then another runtime issue/error popped up around firebaseinitialization being called before firebase was initialised during runtime. Solution: I found that Xcode was not picking up GoogleService-Info.plist file in Xcode running directory so I had to add it manually in Xcode and that fixed that issue

like image 29
mars000 Avatar answered Dec 07 '25 23:12

mars000



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!