I have a team of developers, each one with their own developer account
.
The problem comes with development certificates. Due to each one having its own certificate generated, the project.pbxproj
file is changing every time any developer merge their changes with the main branch (ie, master & their working branches).
Attending to this documentation, every developer has their own certificate and it's logical that the project.pbxproj
changes. Is there any possibility to ignore these changes?
I think xcconfig file usage would help you to omit constant conflicts in git. Idea is that you put certain build settings from project.pbxproj to xcconfig file. I suspect that in your case that variable build setting will be DEVELOPMENT_TEAM . To add xcconfig file to your project go to Xcode -> File -> New... -> File:
Let's assume I've named it Config.xcconfig. Next step is to use that file in project settings. To do this go to Configurations section of your project:
After that you'll have to add new key to Config.xcconfig
. Example: DEVELOPMENT_TEAM = #YOUR_DEVELOPMENT_TEAM#
, DEVELOPMENT_TEAM value can be retrieved from your project.pbxproj file:
After moving DEVELOPMENT_TEAM key from project.pbxproj
to Config.xcconfig
it can be removed from Project settings. Config.xcconfig
then should be added to git but it's value should be modified only locally by any engineer from your team.
In the same manner keys like PROVISIONING_PROFILE_SPECIFIER
, CODE_SIGN_IDENTITY
can be moved.
More information on build settings and xcconfig files can be found here and here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.