跨插件共享单个 cocoa 框架副本

发布于 2024-08-13 16:38:00 字数 223 浏览 4 评论 0原文

我有一组插件,一个用于通用代码的插件框架和一个主机应用程序。这些都位于单独的 Xcode 项目中(包括每个插件的单独项目)。最后,我需要能够在主机应用程序项目上单击构建并运行来构建所有插件、框架和主机应用程序,将它们打包并启动应用程序。

我知道如何将框架和插件包含到主机应用程序项目中,设置依赖项,复制操作等。我不确定的是如何在主机应用程序中包含插件框架的单个副本,以便各种插件使用而不是在每个插件包中包含一个副本。

I have a set of plugins, a plugin framework for common code and a host app. These are each in separate Xcode projects (including separate projects for each plugin). In the end, I need to be able to click build and run on the host app project to build all the plugins, the framework and host app, package them up and launch the app.

I know how to include the framework and plugins into the host app project, set up dependencies, copy actions, etc. What I am not sure about is how to include a single copy of the plugin framework in the host app for the various plugins to use rather than having a copy included in each plugin bundle.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

谷夏 2024-08-20 16:38:00

尝试将插件弱链接到框架,将框架复制到应用程序的 Frameworks 文件夹中,然后以常规方式将应用程序链接到该副本。

Try weak-linking the plug-ins against the framework, copying the framework into the app's Frameworks folder, and linking, in the regular fashion, the app against that copy.

甜中书 2024-08-20 16:38:00

要让它在应用程序构建时自动将框架复制到应用程序的包中,请创建一个新的“复制文件”构建阶段。将框架拖入构建阶段。然后,在复制文件阶段执行获取信息并将目标选择器设置为“框架”。

To have it automatically copy the framework to your application's bundle when the app builds, make a new "Copy Files" build phase. Drag the framework into the build phase. Then, do a Get Info on the Copy Files phase and set the Destination picker to "Frameworks".

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