WatchOS 2 problem:dyld: Library not loaded

来源:互联网 发布:nginx 新增模块 编辑:程序博客网 时间:2024/06/05 08:24


现象

WatchKit Extension报"dyld:Library not loaded"的错误提示,应该是使用的framework没有加载进去

解决办法

在Extension target -> "General" -> "Embedded Binaries"中添加对应的framework





原因

Link binary with libraries Link frameworks and libraries with your project’s object files to produce a binary file. You can link a target’s source files against libraries in the target’s active SDK or against external libraries.
Embed Frameworks You can create an embedded framework to share code between your app extension and its containing app.
Timeline If your containing app target links to an embedded framework, it must include the arm64 architecture or it will be rejected by the App Store.


在App Extension或者Watch Extension中使用三方SDK,则需要使用Embed Frameworks的格式
0 0
原创粉丝点击