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

前端 未结 30 1396
小蘑菇
小蘑菇 2020-11-22 04:27

I am trying to run a Swift app on my iPhone 4s. It works fine on the simulator, and my friend can successfully run it on his iPhone 4s. I have iOS 8 and the official release

相关标签:
30条回答
  • 2020-11-22 04:55

    I started getting this error when I removed:

    @executable_path/Frameworks
    

    from Runpath Search Paths in my build settings. Replacing it fixed everything up again (thank goodness for source control!)

    I don't know how it got there, but it appears to be needed for a binary to find its embedded Swift runtime.

    0 讨论(0)
  • 2020-11-22 04:55

    Change Copy Pods Resources for the target from:

    "${SRCROOT}/Pods/Target Support Files/Pods-Wishlist/Pods-Wishlist-resources.sh"
    

    to:

    "${SRCROOT}/Pods/Target Support Files/Pods-Wishlist/Pods-Wishlist-frameworks.sh"
    
    0 讨论(0)
  • 2020-11-22 04:56

    This issue occurs again in Xcode 10.2. You must download and install the following package from Apple. It provides Swift 5 Runtime Support for Command Line Tools.

    https://support.apple.com/kb/DL1998?locale=en_US

    0 讨论(0)
  • 2020-11-22 04:59

    Surprisingly enough, all i did was "Clean" my project (shift+cmd+K) and it worked. Did seem to be related to the certificate though.

    0 讨论(0)
  • 2020-11-22 04:59

    None of the solutions worked for me. Restarting the phone fixed it. Strange but it worked.

    0 讨论(0)
  • 2020-11-22 05:00

    If you're getting an error like this:

    The bundle "YourFrameworkTests" couldn't be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle. (dlopen_preflight(/some/path/.../YourFrameworkTests.xctest/YourFrameworkTests): Library not loaded: @rpath/SomeOther.framework/SomeOther Referenced from: /some/path/...)

    and use CocoaPods in your framework, then try to edit the Podfile and remove inherit! :search_paths from the Test target, and run pod install again.

    For more details, see https://github.com/CocoaPods/CocoaPods/issues/8868.

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