XCode-Project 文件 .pbxproj - 如何在版本控制中处理它? [英] XCode-Project file .pbxproj - how to handle it in Version Control?

查看:31
本文介绍了XCode-Project 文件 .pbxproj - 如何在版本控制中处理它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的团队中,我们使用 Subversion 作为我们 iOS 项目的 VC 系统.问题是,无论何时使用 .pbxproj 文件中的一个检查,其他人都会得到 CODE_SIGN_IDENTITY 和 PROVISIONING_PROFILE 也更新了错误的值.

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;

那太好了……谢谢!

推荐答案

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

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

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

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. 如果配置没有更改并且没有添加新文件或目标,请在提交代码时检查此文件.
  2. 如果有任何更改,请在每次提交之前通过执行 git diff 检查文件,并决定保留哪些更改以及放弃哪些更改并相应地提交更改.

希望对你有帮助.

这篇关于XCode-Project 文件 .pbxproj - 如何在版本控制中处理它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆