views:

3716

answers:

5

Try to commit my first iPhone application to Subversion found that there's "code signing identity" section in my xcode project.pbxproj file.

CODE_SIGN_IDENTITY = "iPhone Developer: my username here...;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: above...";

The issue is, in our team we use different provisioning which bound to our device. So when other want to run the code on device, they have to change this line. We can share one provisioning to across this, but that way have several downside. Is there any other way to solve it? i.e. include code signing section to another file which not commit to SVN?

A: 

The obvious choice would be to create other build configurations.

tcurdt
A: 

Why are you "changing this line" directly? You should almost never directly edit anything in the .xcodeproj file bundle.

Instead, you should be changing this within your build settings. To be more specific in your case, you need to add several more build configurations, one for each member of the team. That member can then build using their own provisioning file withouth messing with any other build settings.

August
+1  A: 

You can use $(USER) in your build setting definition to include your short user name.

For example:

CODE_SIGN_IDENTITY = "iPhone Developer: $(USER)";

That will use the contents of the USER environment variable in the definition of the CODE_SIGN_IDENTITY build setting.

Chris Hanson
+4  A: 

You can base a project or target configuration on the contents of an xcconfig file that is not checked in to Subversion or is otherwise customized per developer. Add an appropriate xcconfig file to your project and then choose the file from the "Based On" pop-up at the bottom of the Build tab in the Project Info or Target Info window.

For example, you could have a DeveloperSettings.xcconfig file in the project whose contents on your system are:

CODE_SIGN_IDENTITY = "iPhone Developer: favoyang"

while its contents on my system are:

CODE_SIGN_IDENTITY = "iPhone Developer: cmh"

These settings will be inherited by either the project or target configuration that is set to be based on this file.

Chris Hanson
+5  A: 

As long as you have just one signing identity, you can just use "iPhone Developer" as your codesigning identity. Codesign will search for an identity containing "iPhone Developer" and use that.

Mike Akers
I think this is new as of 2.2 so not all the directions out there reflect this.
Jeffrey Fredrick