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

前端 未结 30 1395
小蘑菇
小蘑菇 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 05:09

    After having tried out everything, I finally found out, that the build seems not always include every detail again and again. Maybe for speeding up the process... In order to ensure WHOLE packaging before running on a device, make a Clean first: Shift-Cmd-K. Then build with: Cmd-B. After that run it on your device. Easy. Kind regards to all you nice guys in that place!

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

    For me, having tried everything with no success, what worked was to remove @executable_path/Frameworks from the Packaging section (don't know how it came to be in there in the first place)

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

    For the device, you also need to add the dynamic framework to the Embedded binaries section in the General tab of the project.

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

    For me building a MacOS command line Swift app that depended on 3rd party Swift libs (e.g. SQLite) none of the above solutions seemed to work. What did work was directly adding the following path to my Runpath Search Paths in the Build Settings:

    /Applications/Xcode.app/Contents//Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/

    Doing that did give a warning at runtime saying that Xcode had found 2 versions of libswiftCore - which makes sense. Except that not including that line resulted in Xcode not finding any versions of libswiftCore.

    Anyway, that'll do for me even if it doesn't seem right - my app is just a utility that I'm not intending to distribute and at least it runs now!

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

    I started getting this similar error for testing adding S3 file using AWS services. Below was the error. dyld: Library not loaded: @rpath/AWSAutoScaling.framework/AWSAutoScaling

    I searched a lot and above solutions are also not helpful for me. Below link helped me to solve this issue.

    https://forums.developer.apple.com/thread/21292

    Which says to fix this issue by re-downloading the WWDR (Apple Worldwide Developer Relations Certification Authority).

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

    none of these solutions seemed to work but when I changed the permission of the world Wide Developer cert to Use System defaults then it worked. I have included the steps and screenshots in the link below

    I would encourage you to log the ticket in apple bug report as mentioned here as Apple really should solve this massive error: https://stackoverflow.com/a/41401354/559760

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