Avatar ·

dyld: Library not loaded: @rpath/libswiftCore.dylib error when launching iOS app

Hello everyone! I'm a beginner iOS developer, writing my first app in Swift. I'm using Xcode 14, created the project from scratch with the standard Single View App template. Everything was building and running fine, but after I added a couple of third-party libraries via CocoaPods (Alamofire and SwiftyJSON), when running on the iPhone 14 Pro simulator (iOS 16.2), I get this error:\n\ndyld: Library not loaded: @rpath/libswiftCore.dylib\n Referenced from: /Users/username/Library/Developer/CoreSimulator/Devices/.../.../MyApp.app/Frameworks/libswiftCore.dylib\n Reason: no suitable image found. Did find:\n /Users/username/Library/Developer/CoreSimulator/Devices/.../.../MyApp.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x..., size=0x... segment=__TEXT with unix errno=1 (Unknown error: 0)\n\nAp