I am working on an iOS application in a team of several developers. We all have our developer certificates for one development profile. When I create the application we are working on to check it on the device, I need to explicitly specify the code signing identifier for use. Otherwise, if I select the automatic profile selector, I get a code signature mismatch error when loading the application into services such as HockeyApp. Indeed, when I select the automatic profile selector, it seems to select the IOS Team Provisioning provisioning profile, not the development profile defined for the application I am creating.
When I was the only developer of this application, I fixed this problem by hard-coding a suitable code signing object for use in build settings. The problem is that I'm not the only developer in this project. The problem with hardcoding my code signing identifier in my project settings is that I have to delete it every time I make changes to the project parameters, or if I don't have my teammates, they will get errors when they sign the application. stating that the signature code on the computer could not be found.
So, I'm trying to set up a .xcconfig file, where each team member will indicate which code signature identification to use. This file would not be a version, so everyone could set their own code signing signature explicitly without causing problems for other developers on the same team.
I managed to include the .xcconfig file in my project, and it is processed during the build phase. However, I could not write the .xcconfig file, which solves the problem of code signing. I tried putting the following line in my .xcconfig file:
CODE_SIGN_IDENTITY = iPhone Developer: Firstname Name (XXXXXXXXXX)
where Name Name (XXXXXXXXXX) is the result of copying / pasting the code signing identifier that I want to use from the build settings into the .xcconfig file. Later I realized that all my code signing identifiers for all my development profiles (one for each application or package identifier) โโgive the same result when I copy / paste them from the build settings into a .xcconfig file.
I was looking for a way to distinguish them, but I could not find the one that works. Do you have any idea how I can solve this problem?
I also tried using the [sdk = iphoneos *] modifier, without success.
I would like to avoid using various assembly configurations because I feel that I will have to combine the changes made in the main configuration into a new assembly configuration, which will be made only with the aim of using the correct code signing identifier. However, I am not familiar with how configuration building works in Xcode, so feel free to teach me this if you think this might be a good solution.
Thanks!