本文共 715 字,大约阅读时间需要 2 分钟。
现象
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的格式