Library not loaded: @rpath/libswiftCore.dylib

Recently we encountered an error after building our project. App crashed while opening. Any help? No online solution helped. Here is the log:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 1 Library missing
Library not loaded: @rpath/libswiftCore.dylib
Referenced from: <8A390533-5381-32BC-8D7F-86ACA722025A> /Volumes/VOLUME/*/VisionAi.app/VisionAi
Reason: tried: '/private/var/containers/Bundle/Application/D9A0E845-0185-4FF4-953B-59F2EA6E4D44/VisionAi.app/Frameworks/libswiftCore.dylib' (no such file), '/private/var/containers/Bundle/Application/D9A0E845-0185-4FF4-953B-59F2EA6E4D44/VisionAi.app/Frameworks/libswiftCore.dylib' (no such file), '/private/var/containers/Bundle/Application/D9A0E845-0185-4FF4-953B-59F2EA6E4D44/VisionAi.app/Frameworks/libswiftCore.dylib' (no such file), '/private/var/containers/Bundle/Application/D9A0E845-0185-4FF4-953B-59F2EA6E4D44/VisionAi.app/Frameworks/libswiftCore.dylib' (no such file), '/usr/local/lib/libswiftCore.dylib' (no such file), '/usr/lib/libswiftCore.dylib' (no such file, not in dyld cache)
(terminated at launch; ignore backtrace)

** Current Xcode version 14.3.1**

Library not loaded: @rpath/libswiftCore.dylib

This suggests that your project has a problem with its dynamic linker rpath configuration. Something similar recently came up in a DTS incident I was working on, so I decided to write up my explanation. Start with Dynamic Library Identification and then follow the link to Dynamic Library Standard Setup for Apps and its Swift System Libraries section.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Library not loaded: @rpath/libswiftCore.dylib
 
 
Q