dyld: Library not loaded: @rpath/libswiftCore.dylib / Image not found

前端 未结 27 2593
我在风中等你
我在风中等你 2020-11-27 14:01

I am running my app from xcode to my iOS device and I get this and black screen on iOS device.

Console text:

dyld: Library not loaded: @rpath/libswif         


        
相关标签:
27条回答
  • 2020-11-27 14:47

    I fixed by deleting all from Xcode Derived Data directory:

    ~/Library/Developer/Xcode/DerivedData

    Good luck all!

    0 讨论(0)
  • 2020-11-27 14:48

    I had this error in a command line project (Xcode 10.2 and macOS 10.14.3)

    The solution was to update to macOS 10.14.4

    Swift command line projects won’t run on macOS 10.14.3 and earlier unless you install the Swift 5 Runtime Support for Command Line Tools package. Without that package, Swift command line projects crash on launch with “dyld: Library not loaded” errors. (46824656)

    From Swift 5 Release Notes for Xcode 10.2

    0 讨论(0)
  • 2020-11-27 14:48

    I have faced the same issue, setting the right code sign identity solved the problem(Build settings->Code Signing Identity).

    As per Apple technical questions "All Enterprise and standard iOS developer certificates that are created after iOS 8 was released have the new Team ID field in the proper place to allow Swift language apps to run"

    0 讨论(0)
  • 2020-11-27 14:51

    Try adding the following line to Runpath Search Paths of your target.

    @executable_path/Frameworks
    

    your_target -> Build Settings -> Linking -> Runpath Search Paths

    0 讨论(0)
  • 2020-11-27 14:52

    In the Framework Target (not the app target), go to Build Settings > Build Options > Always Embed Standard Swift Libraries to YES.

    This solved the issue for me!

    0 讨论(0)
  • 2020-11-27 14:53

    Try cleaning the build folder, I was having the same problem and I solved it this way: Product -> Clean Build Folder

    0 讨论(0)
提交回复
热议问题