Xcode-Project 文件 .pbxproj - 如何在版本控制中处理它?

发布于 2024-12-05 14:20:59 字数 490 浏览 0 评论 0原文

在我们的团队中,我们使用 Subversion 作为 iOS 项目的 VC 系统。问题是,每当其中一个用户检查 .pbxproj 文件时,其他用户的 CODE_SIGN_IDENTITY 和 PROVISIONING_PROFILE 也会更新为错误的值。

我们配置有问题吗?有可能解决这个问题吗?例如变量或类似的东西?这样项目文件包含

"ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = NO;
CODE_SIGN_IDENTITY = {first_variable_here-same_for_all_developers};
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = {second_variable_here-same-for-all-developers};
COPY_PHASE_STRIP = NO;

那就太好了...谢谢!

In our team, we're using Subversion as VC-system for our iOS-projects. The problem is, that whenever one of use checks in the .pbxproj-file, the others get the CODE_SIGN_IDENTITY and PROVISIONING_PROFILE also updated with wrong values.

Are we configuring something wrong? Is there a possibility to fix this? E.g. variables or something like that? So that the project file contains

"ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = NO;
CODE_SIGN_IDENTITY = {first_variable_here-same_for_all_developers};
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = {second_variable_here-same-for-all-developers};
COPY_PHASE_STRIP = NO;

That would be really great... thanks!

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

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

发布评论

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

评论(1

甜心 2024-12-12 14:20:59

pbxproj 文件维护一些配置以及对添加到项目中的新目标和文件的引用。

因此,您不能将其放入 gitignore 中,因为当您向项目添加新目标或新文件时,它会产生问题。正如我的情况一样 - 一些文件在 xcode 中不可见。但它们在取景器中可见

因此,我们处理该文件的方法如下:

  1. 如果配置没有更改并且没有添加新文件或目标,则在提交代码时签出该文件。
  2. 如果有任何更改,请在每次提交之前通过执行 git diff 检查文件,并决定保留哪些更改以及放弃哪些更改,然后相应地提交更改。

希望对您有帮助。

The pbxproj file maintains the some configuration and references to the new targets and files that are added to the projects.

So, you cannot put it in in the git ignore, as it will create a problem when you add new targets or new files to your project. As it happened in my case - Some files not visible in xcode. But they are visible in finder

So, the approach we followed to handle this file is as follows

  1. Checkout this file while committing the code if there are no changes in the configurations and if no new files or targets are added.
  2. If there are any changes, check the file before every commit by doing git diff and decide which changes to keep and which changes to discard and accordingly commit the changes.

Hope it helps you.

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