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

前端 未结 27 2592
我在风中等你
我在风中等你 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:29

    @Saikiran's answered worked.

    My certificates were generated before iOS 8 was released. I revoked all my certificates and regenerated all provisioning profiles and it solved my problems immediately.

    I don't have enough reputation to vote up @Saikiran's answer, but that definitely helped solving the problem.

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

    I had the same error message, this is how I solved it : This is happening because i changed bundle identifier, so i just put old bundle id and it started to work again

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

    I tried a bunch of the cases above and it didn't seem to solve my issue. I use git and cocoapods for a project, and the error went away as soon as I made a new commit.

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

    Oh yes. I've faced with that problem spending hours on solution. You may try to set "Always Embed Swift Standard Libraries" to "Yes" under your Build Settings > Build Options

    (don't forget to shift+cmd+K your project after)

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

    I already had the Runpath Search Paths set correctly, but it still didn't work. @Justin Domnitz's answer put me on the right track: Setting "Always Embed Swift Standard Libraries" to Yes in my target's build settings did the trick for me.

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

    Seems this issue was caused by the inclusion of Swift file into objective-c custom framework. Also unsure if related but my app target was built in objective-c as well. Also building to simulator in debug. Haven't verified for release or archive build yet.
    Additionally Runpath Search Settings for the project target were set to "@executable_path/Frameworks", within the target settings for the framework they were set to: "@executable_path/Frameworks" and "@loader_path/Frameworks".

    After having tried rebuilding custom framework and reattaching to app target, clearing derived data folder and a couple other suggestions, what ultimately worked for me was changing the build setting within Project target for the custom framework project (not app target): "Always Embed Swift Standard Libraries" to "YES". It appeared not to matter what the setting for the app target was set to. I verified this by resetting the simulator and rebuilding. This is similar to Daniele Ceglia's answer but I wasn't able to add a comment and wanted to provide more clarity.

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