pbxProject.prototype.addFramework: automatically create Frameworks Group if it does not exist
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- ios, javascript, nodejs
- 领域
- mobile
调研方向
从 pbxProject.prototype.addFramework 开始,跟踪 Frameworks 组和 project mainGroup 的处理方式。使用 issue 中的 workaround 作为行为参考。当缺失的 Frameworks 组既被创建又被 mainGroup 引用,从而使 Xcode 不将 framework 放入 Recovered References 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
This is a feature proposal
Initial Situation:
Your xcode project tree looks like this:

You have a Xcode project without a Framworks group and you want to add a new framework using pbxProject.prototype.addFramework.
Current behaviour:
The Frameworks group is created but not added to the mainGroup of the project which references all files (that are not part of a subgroup) and all groups (that are no subgroups).
If you open the updated xcode project with xcode you see the following:
This is because xcode cannot find a reference to the Frameworks group on the mainGroup and therefore "autofixes" the project by adding the library added with pbxProject.prototype.addFramework to a newly generated group Recovered References.
Expected behaviour:
The Framework group is created and also automatically added to the mainGroup.
When you open the project in xcode it should look like this:
Current workaround:
Add the Frameworks group to mainGroupmanually:
const project = xcode.project(projectPath);
project.parseSync();
project.addFramework(path.resolve(frameworksDirectory, 'GoogleInterchangeUtilities.framework'), {
customFramework: true,
embed: true,
link: true,
});
const mainProject = project.getPBXGroupByKey(project.getFirstProject().firstProject.mainGroup);
if (!mainProject.children.some(children => children.comment === 'Frameworks')) {
const [groupKey] = Object.entries(project.hash.project.objects['PBXGroup']).find(
([, group]) => group.name === 'Frameworks',
);
project.addToPbxGroup(groupKey, project.getFirstProject().firstProject.mainGroup);
}
If you are okay with this feature proposal I would love to implement it!
- 主要语言
- JavaScript
- 星标
- 217
- 派生
- 102
- 平均合并
- 2 天 9 小时
- 30 天内合并 PR
- 8
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/cordova-node-xcode 的其他 Issue
-
Add & Improve JSDocs可能重新可做 @erisu 于 95 天前认领,目前没有进行中的 PR。 未关闭enhancement
apache/cordova-node-xcode#171 · 已指派 1 人 ·
-
🔖 New release未关闭
难度 3/5 1-2 天 新手友好度 35/100
apache/cordova-node-xcode#162 · 4 条评论 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 28/100
apache/cordova-node-xcode#139 · 2 条评论 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
apache/cordova-node-xcode#138 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
apache/cordova-node-xcode#137 · 2 个 reaction ·
查看 apache/cordova-node-xcode 的全部 Issue
相似的 Issue
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 78/100
jaegertracing/jaeger-ui#4512 ·
维护者通常 1 天内回复
-
feedback simulation workshop
难度 2/5 1-3 小时 新手友好度 84/100
githubnext/gh-aw-workshop#3857 ·
维护者通常 2 天内回复
-
area-clientside-dartpad
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
quarkusio/extensions#3432 ·
维护者通常 1 天内回复