Ayesha Amjad
Ayesha Amjad

Reputation: 9

Linker command failed with exit code 1 - details below

Xcode 15.2

macOS 13.7.1

macbook 2017( cannot update device or softwares )

My Flutter app is running smoothly over all android devices, but recently I tried testing it on my physical iPhone device and I see this error,

Xcode build done. 1067.8s Failed to build iOS app Could not build the precompiled application for the device.

Error (Xcode): Undefined symbols:

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation) 2

Error launching application on iPhone 11 Testing.

Earlier, it was running on the same iPhone also.

I have tried updating base urls of debug, release and profile, and updating pods also, but this doesn't fix it.

Upvotes: 0

Views: 40

Answers (1)

Ostoura
Ostoura

Reputation: 2562

If you have added or updated a new materials or media files like photos or images may be the copyrights restrict it or some are mistaken media files, The solution is :

Go To Terminal

cd <your Project Location>

Apply This To Check If There A Mistaken Photos

ls -al@ *

If Any File Have @ In Its Attributes It Means It Is The Mistaken

Example:

-rw-r--r--@  1 your name  staff    274 Jul 13 11:04 Black.png

The Solution

On The Root Of Your Project Apply This In Terminal One By One

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

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

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

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

P.S. you can add more extensions like mp4 or mov if you added other media types

Then to check Apply

ls -al@ *

And make Sure No File Have @ In Its Attributes

Example

-rw-r--r--   1 your name  staff   6857 May 20 23:19 Black.png

Hopefully that was your case.

Upvotes: 0

Related Questions