I am trying to sign and archive my Unity application with Jenkins. I have the Xcode jenkins plugin installed and everything seems to run well except for a strange problem.
During the xcodebuild phase, when the archive should be signed, I get the following error:
error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "QF6V2M666X" with a private key was found. (in target 'Unity-iPhone')
Now the problem is that I am not trying to build for development, but for production. I have a production provisioning profile used, which is pointing the production certificate. The team id is the production team id (changed here for security reasons). Here is another part of the build output:
Going to invoke xcodebuild:, scheme: Unity-iPhone, sdk: DEFAULT, project: DEFAULT, configuration: Release, clean: NO, archive:YES, consolelog:YES, symRoot: DEFAULT, buildDir: DEFAULT, developmentTeamID: QF6V2M666X
[sr-ios] $ /usr/bin/xcodebuild -scheme Unity-iPhone -configuration Release archive -archivePath
When I open the project in Xcode, I can see that for some reason Xcode selects "IOSDeveloper" in the code signing identities part and not "IOSDistribution" (or the actual certificate in the provisioning profile):

I don't know if this can be changed from Jenkins, but I think Xcode should pick this up from the provisioning profile.
