Cocoa Touch 静态库 - 与标准框架链接

发布于 2025-01-04 00:41:57 字数 226 浏览 3 评论 0原文

我创建了一个可可触摸静态,它使用标准的苹果框架,如 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

豆芽 2025-01-11 00:41:57

不,不幸的是没有办法实现这一点。您必须将您的主项目与库使用的框架链接起来。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文