swalkner
swalkner

Reputation: 17339

Xcode-Project file .pbxproj - how to handle it in Version Control?

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!

Upvotes: 5

Views: 2918

Answers (1)

Deepak Terse
Deepak Terse

Reputation: 712

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.

Upvotes: 1

Related Questions