Cocoa Touch 静态库 - 与标准框架链接
我创建了一个可可触摸静态,它使用标准的苹果框架,如 MediaPlayer.framework 和 CoreData.framework。当我将我的主项目链接到这个静态库时,它会抛出错误,因为该库需要这些框架。
我的问题:有没有办法设置静态库来链接这些框架,这样我就不需要将它们添加到我的主项目中?我尝试将框架添加到静态库的“链接二进制文件与库”构建阶段,但主项目仍然不舒服。
我可能缺少某种构建设置标志。
I have created a cocoa touch static that uses standard apple frameworks like MediaPlayer.framework and CoreData.framework. When I link my main project against this static library it throws errors because that library requires those frameworks.
My question: Is there a way to set the Static Library to link against those frameworks so I don't need to add them to my main project? I tried to add the frameworks to the static library's "Link Binary with Libraries" build phase, but the main project still throws a fit.
There is probably some sort of Build Setting flag I am missing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,不幸的是没有办法实现这一点。您必须将您的主项目与库使用的框架链接起来。
No, unfortunately there is no way to achieve this. You have to link your main project against the frameworks that are used by the library.