我们可以从.framework文件中删除依赖项并在最终用户应用中分别添加它们吗?

发布于 2025-01-17 11:51:47 字数 155 浏览 1 评论 0原文

我正在制作一个自定义框架,其中包括第三方库,因为这些库我的框架文件大小正在增加。有什么方法可以从.framework文件中删除第三方库,如果最终用户想使用这些库的功能,他会分别添加它们。

如果我删除依赖项,则不会生成框架文件。

任何人都可以帮助将这个问题与之相关联吗?

I'm making a custom framework, which included third-party libraries due to these libraries my framework file size is increasing. Is there any way we can remove third-party libraries from the .framework file and if the end-user wants to use the functionality of those libraries, he adds them separately.

If I remove dependencies then the framework file is not generated.

Can anyone please help related this problem?

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

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

发布评论

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

评论(1

夢归不見 2025-01-24 11:51:47

必须从框架中删除第三方库,并将最终用户添加它们。像您这样做是不正确的。这导致重复的符号和不确定的行为。

做您描述的最常见方法是使用软件包管理器,特别是 spm 和/或 cocoapods

如果您手工执行此操作,则需要将依赖框架链接起来,但将其标记为“不要嵌入”。手工做到这一点可能会有些麻烦和脆弱,这就是为什么它几乎总是在包装管理人员身上完成的原因。

You must remove third-party libraries from your framework and have the end-user add them. It is incorrect to bundle them as you're doing. This leads to duplicated symbols and undefined behavior.

The most common way to do what you're describing is with a package manager, particularly SPM and/or CocoaPods.

If you do this by hand, you'll need to link the dependent frameworks, but mark them as "do not embed." Doing this correctly by hand can be a bit cumbersome and fragile, which is why it's almost always done with package managers.

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