Xcode error while archiving: No such file or directory

3k views Asked by At

I am trying to archive an App to generate an Adhoc version and I'm getting this error:

/Users/XX/Library/Developer/Xcode/DerivedData/XX-agdiwzkbuiqgyudhcwqimxlyeiqc/Build/Products/Debug-iphoneos/SQLite.swift/SQLite.framework: No such file or directory

I tried multiple solution from updating my Cocoapods to removing the Derived Data and nothing worked.

I'am using Xcode 8.2.1

3

There are 3 answers

0
Olyve On BEST ANSWER

If you are including frameworks or libraries in your project, make sure that you included them from the correct location. I ran into a similar situation where I was trying to embed a framework and it was pulling it from the DerivedData folder rather than the actual location.

It might be helpful to remove embedded frameworks in your Project file and then include them again. Make sure that the framework location is the actual path to the library relative to your project and not the simulator files.

0
Robert D. Mogos On

How are you installing it? I guess you are using this right?

For Cocoapods are you using Xcode Beta. It seems that you need to work with the default one:

sudo xcode-select --switch /Applications/Xcode.app

If it doesn't work with cocoapods, try using it with Swift Package Manager

0
Letaief Achraf On

Ok so as SamG said, Xcode was actually pulling the SQLite.framework from the DerivedData for some reason.

As shown here:

Besides that, i removed the SQLite Pod and installed it manually following this

and now its working.