I'm getting this error upon launch of my app. I am building under Xcode 9.0 (9A235) on MacOS High Sierra 10.13. I also tried building under Xcode 8.3.3 with the same result. The project is generally Objective C, but the framework YouAppi.framework is Swift:
dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
Referenced from: /private/var/containers/Bundle/Application/7D3E2815-4CA3-4258-AEF6-C0626055A8F2/dingbats.app/Frameworks/YouAppi.framework/YouAppi
Reason: image not found
At first glance, this appears to be a duplicate of this question, but the error is different in that one. In that other question, the Reason is no suitable image found, where mine is image not found.
I've tried the following to resolve:
- Remove and re-add the framework
- Clean and Option+Clean the project
- Delete ~/Library/Developer/Xcode/DerivedData folder
- Build Settings -> Always Embed Swift Standard Libraries = Yes
- Build Settings -> Strip Swift Symbols = No
- Build Settings -> Linking -> Runpath Search Paths --
- added @loader_path
- added @rpath
- added @executable_path/Frameworks
- Checked developer and distribution certificates that Trust was set to Use System Defaults
- Checked that I have latest WWDR and G2 certificates installed
- Checked validity of above-mentioned certificates
- Moved YouAppi.framework into Frameworks/ folder. (It was originally in a "Third-Party Frameworks" folder.)
- Tried copying libswiftAVFoundation.dylib into my project's Frameworks folder
I haven't moved to a new computer recently.
I have the same result on my iPhone 7+ running iOS 11.0.23 (15A432) as well as an iPad Mini 1 running iOS 9.3.5 (13G36).
Also tried this:
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Caches/com.apple.dt.Xcode
Ideas?