Investigate why app & system extension shared dependencies fail to embed
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- swift
- 领域
- build-system, desktop
调研方向
首先复现 issues #145、#98 和 #143 中描述的 release-build 失败,重点关注 App 和 VPN 系统扩展 targets 共享的依赖项。准备一个显示缺少的 embedded framework 的最小可复现示例,然后按照 issue 中的描述,为 Apple Developer Forums 和 Feedback Assistant 记录结果。
由索引模型根据 Issue 内容生成。
描述
In both #145 and #98, I've encountered an issue with release builds of the app. These issues arose when a dependency was required by both the App target (or any of it's dependencies), and the system extension target (and any of it's dependencies).
In #98, the issue occurred when protobuf definitions were added directly to the app target, or a new framework target that would be depended on by the app target. They were previously working fine being depended on by just VPNLib (which the system extension depends on).
In the first case, the network extension would crash. In the second case, the app would crash.
The crash reason was:
Library not loaded: @rpath/SwiftProtobuf.framework/Versions/A/SwiftProtobuf
Other users have reported this issue https://github.com/apple/swift-protobuf/issues/1506#issuecomment-2435125065
In #143, the issue occured when InternalCollectionsUtilities was depended on by both the App target, and the VPN target (via another framework, VPNLib). When a library that depended on swift-collections was added to the app target, the network extension would crash on startup with the error:
Library not loaded: @rpath/InternalCollectionsUtilities.framework/Versions/A/InternalCollectionsUtilities
FWICT, xcode is making some form of optimisation where it constructs a framework for code shared between two different targets. This poses an issue with a system extension, which is copied and executed outside of the app bundle. A copy of the system extension always lives in the app bundle, so it's trivial for the app to depend on a framework present within the system extension bundle (we already do this), but not the other way around. If there was some way to tell xcode to embed this new framework within the system extension bundle, we wouldn't have this issue.
Instead, the workaround we've gone with is to simply put everything that would cause this issue in VPNLib, as to minimise the number of times we depend on any one package.
This issue doesn't require immediate action, and is more so for book-keeping. It would be good to post this alongside an MRE on the Apple developer forums and in Apple feedback assistant.
- 主要语言
- Swift
- 星标
- 29
- 派生
- 9
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/coder-desktop-macos 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
coder/coder-desktop-macos#285 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
coder/coder-desktop-macos#230 · 2 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
coder/coder-desktop-macos#221 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 半天 新手友好度 48/100
coder/coder-desktop-macos#220 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
coder/coder-desktop-macos#212 · 1 条评论 ·
维护者通常 1 天内回复
查看 coder/coder-desktop-macos 的全部 Issue
相似的 Issue
-
area:shell order:5 status:ready type:bug
难度 1/5 1 小时以内 新手友好度 85/100
krystianslowik/arkt#899 ·
维护者通常 1 天内回复
-
help wanted roadmap tests
难度 2/5 1-3 小时 新手友好度 68/100
-
🐞 bug 💠 component 🔍 triage v4 🧰 library
难度 1/5 1 小时以内 新手友好度 72/100
Orange-OpenSource/ouds-ios#1875 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
521xueweihan/HelloGitHub#4295 ·
-
难度 2/5 1-3 小时 新手友好度 78/100