美文网首页iOS常见问题iOS相关iOS面试题
iOS的 Library not loaded: @rpath/

iOS的 Library not loaded: @rpath/

作者: any_where | 来源:发表于2016-01-25 11:42 被阅读2170次

    当xcode跑OC没有问题,跑swift却出现一下这种问题时:

    1.dyld`dyld_fatal_error:

    ->  0x120071088 <+0>: brk    #0x3

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

    解决办法:

    1.在targets->build settings,搜索runpath search paths ,增加一个@executable_path/Frameworks

    2.如果原来就有这个条目,删除重新添加下,记得clean下项目

    3.target - > build settings - > embedded content contains swift code ,此条目apple 默认是不开启的,如果上面方法还是不能解决的话,就把这个条目设置成YES,不过我的还是默认设置NO

    相关文章

      网友评论

      • 未兆谋:"如果原来就有这个条目,删除重新添加下,记得clean下项目" 这一点非常重要!!!
        不要以为本来就有,没必要删除再添加!
      • kxkd:解决了,非常感谢楼主!
      • Fathi_:现在开启swift的选项改成了 “Aways Embed Swift Standard Libraries”
      • 巴图鲁:厉害
      • 4edba6836fe0:一直报错,早知道我就不升级xocde 和 mac os 啦
        好多坑啊。。。。。。。。。
      • 4edba6836fe0:dyld: Library not loaded: @rpath/libswiftCore.dylib
        Referenced from: /private/var/mobile/Containers/Bundle/Application/52108DA0-74D3-4BA2-B31F-73B68C892CA7/边锋德州.app/边锋德州
        Reason: no suitable image found. Did find:
        /private/var/mobile/Containers/Bundle/Application/52108DA0-74D3-4BA2-B31F-73B68C892CA7/边锋德州.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x10179C000, size=0x00204000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/52108DA0-74D3-4BA2-B31F-73B68C892CA7/边锋德州.app/Frameworks/libswiftCore.dylib
        /private/var/mobile/Containers/Bundle/Application/52108DA0-74D3-4BA2-B31F-73B68C892CA7/边锋德州.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x101BF4000, size=0x00204000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/52108DA0-74D3-4BA2-B31F-73B68C892CA7/边锋德州.app/Frameworks/libswiftCore.dylib
      • any_where:相互交流 :smiley:
      • 连命都给你了:这个可以解决,本来我的emb已经设置为yes了,还是报错,看了你的文章,完美解决,多谢多谢

      本文标题:iOS的 Library not loaded: @rpath/

      本文链接:https://www.haomeiwen.com/subject/fvzrkttx.html