dyld: Library not loaded: @rpath/libswiftContacts.dylib

前端 未结 5 899
我在风中等你
我在风中等你 2021-01-12 22:03

dyld: Library not loaded: @rpath/libswift_stdlib_core.dylib

dyld: Library not loaded: @rpath/libswiftCore.dylib. Issue persist

I know that theses question ha

相关标签:
5条回答
  • 2021-01-12 22:11

    This error is caused due to invalid certification of Apple.

    Go to your keychain access. Under "Keychains" select "System" and under "Category" select "Certificates". Check whether the "Apple Worldwide Developer Relations Certification Authority" is valid or not. If not download that certificate from Apple site. It'll solve the problem.

    0 讨论(0)
  • 2021-01-12 22:13

    In our case, it was clear that there was a bug in the way Xcode was resolving dependencies to our target.

    Let's me start by saying, the solution was:

    import PassKit
    

    Now, before you raise that eyebrow, here is why this worked:

    1. We relied on a Swift framework that imports PassKit
    2. We distributed the prebuilt binary to team members
    3. The team observed the crash, just as OP mentioned it
    4. Adding that import in the app target made Xcode embed the required swift libraries

    Note: Just linking PassKit in the GUI did absolutely nothing.

    0 讨论(0)
  • 2021-01-12 22:25

    I know this is old question, but this is what helped me Speaking shortly:

    EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
    
    0 讨论(0)
  • 2021-01-12 22:31

    I had this same error for a couple of weeks:

    dyld: Library not loaded: @rpath/libswiftContacts.dylib
    

    Basically I was able to run and test my app on device. Then about 2 weeks ago, I wasn't able to run the tests on device anymore. Tests were running fine on simulator. I can't think what changed. The error I saw was the one above. I searched Google for ages trying to find a solution, and tried many fixes unsuccessfully. The fix that finally worked was to delete the Derived Data. Once I did this, I was once again able to run the tests on my device.

    Fix that worked for me:

    1. Go to Xcode > Preferences > Locations > Derived Data (click on little arrow to open up the folder in finder) e.g. /Users/[username]/Library/Developer/Xcode/DerivedData

    2. Delete the entire DerivedData folder

    3. Clean/Build

    4. Test on device - finally works again

    0 讨论(0)
  • 2021-01-12 22:31

    Cracked it.

    Check if the framework you're trying to build or one of it's dependency framework uses any of the Swift standard libraries. If yes, create a NEW key in the build settings

    ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;

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