Dyld错误消息:未加载库:@ rpath / libswiftAssetsLibrary.dylib

时间:2015-03-27 22:39:47

标签: ios objective-c iphone swift

当我们为临时部署构建应用程序并运行它时,应用程序立即崩溃,我在崩溃日志中看到以下内容:

**Dyld Error Message:**
  **Library not loaded: @rpath/libswiftAssetsLibrary.dylib**
  Referenced from: /private/var/mobile/Containers/Bundle/Application/73FD1DE2-820C-443C-B7CA-B79DB9CF3466/MyApp.app/MyApp
  Reason: no suitable image found.  Did find:
    /private/var/mobile/Containers/Bundle/Application/73FD1DE2-820C-443C-B7CA-B79DB9CF3466/MyApp.app/Frameworks/libswiftAssetsLibrary.dylib: mmap() error 1 at address=0x0052F000, size=0x00004000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/73FD1DE2-820C-443C-B7CA-B79DB9CF3466/MyApp.app/Frameworks/libswiftAssetsLibrary.dylib
    /private/var/mobile/Containers/Bundle/Application/73FD1DE2-820C-443C-B7CA-B79DB9CF3466/MyApp.app/Frameworks/libswiftAssetsLibrary.dylib: mmap() error 1 at address=0x0053A000, size=0x00004000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/73FD1DE2-820C-443C-B7CA-B79DB9CF3466/MyApp.app/Frameworks/libswiftAssetsLibrary.dylib
  Dyld Version: 353.10

根据关于SO的不同问题的建议,我们尝试了以下但没有运气:

  1. 撤销并重新生成证书
  2. 确保新证书具有OU设置
  3. 确保运行路径具有@ executable_path / Frameworks
  4. 确保嵌入内容包含swift代码设置为yes。
  5. 我们仍然遇到这个问题。任何帮助/指针将不胜感激。

1 个答案:

答案 0 :(得分:1)

我通过删除派生数据文件夹解决了同样的问题。 脚步: XCode-> Preference-> Locations-> Derived data-> Advanced 找到该文件夹​​并将其删除。 在重建之后它就可以了。

相关问题