Try to commit my first iPhone application to Subversion found that there's "code signing identity" section in my xcode project.pbxproj file.
尝试将我的第一个iPhone应用程序提交给Subversion,发现我的xcode project.pbxproj文件中有“代码签名身份”部分。
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?
问题是,在我们的团队中,我们使用绑定到我们设备的不同配置。因此,当其他人想要在设备上运行代码时,他们必须更改此行。我们可以共享一个配置,但这种方式有几个缺点。有没有其他方法可以解决它?即包括代码签名部分到另一个不承诺SVN的文件?
5 个解决方案
#1
12
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.
只要您只有一个签名身份,您就可以使用“iPhone Developer”作为您的代码签名身份。 Codesign将搜索包含“iPhone Developer”的身份并使用它。
#2
11
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.
您可以将项目或目标配置基于未签入Subversion的xcconfig文件的内容,也可以按开发人员自定义。将适当的xcconfig文件添加到项目中,然后从“项目信息”或“目标信息”窗口中“构建”选项卡底部的“基于”弹出窗口中选择文件。
For example, you could have a DeveloperSettings.xcconfig
file in the project whose contents on your system are:
例如,您可以在项目中拥有一个DeveloperSettings.xcconfig文件,其中的系统内容为:
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.
这些设置将由设置为基于此文件的项目或目标配置继承。
#3
1
You can use $(USER)
in your build setting definition to include your short user name.
您可以在构建设置定义中使用$(USER)来包含您的短用户名。
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.
这将在CODE_SIGN_IDENTITY构建设置的定义中使用USER环境变量的内容。
#4
0
The obvious choice would be to create other build configurations.
显而易见的选择是创建其他构建配置。
#5
0
Why are you "changing this line" directly? You should almost never directly edit anything in the .xcodeproj file bundle.
你为什么直接“改变这条线”?您几乎不应该直接编辑.xcodeproj文件包中的任何内容。
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.
相反,您应该在构建设置中更改此设置。在您的情况下更具体,您需要添加几个构建配置,每个成员对应一个团队成员。然后,该成员可以使用他们自己的配置文件进行构建,而不会弄乱任何其他构建设置。
#1
12
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.
只要您只有一个签名身份,您就可以使用“iPhone Developer”作为您的代码签名身份。 Codesign将搜索包含“iPhone Developer”的身份并使用它。
#2
11
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.
您可以将项目或目标配置基于未签入Subversion的xcconfig文件的内容,也可以按开发人员自定义。将适当的xcconfig文件添加到项目中,然后从“项目信息”或“目标信息”窗口中“构建”选项卡底部的“基于”弹出窗口中选择文件。
For example, you could have a DeveloperSettings.xcconfig
file in the project whose contents on your system are:
例如,您可以在项目中拥有一个DeveloperSettings.xcconfig文件,其中的系统内容为:
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.
这些设置将由设置为基于此文件的项目或目标配置继承。
#3
1
You can use $(USER)
in your build setting definition to include your short user name.
您可以在构建设置定义中使用$(USER)来包含您的短用户名。
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.
这将在CODE_SIGN_IDENTITY构建设置的定义中使用USER环境变量的内容。
#4
0
The obvious choice would be to create other build configurations.
显而易见的选择是创建其他构建配置。
#5
0
Why are you "changing this line" directly? You should almost never directly edit anything in the .xcodeproj file bundle.
你为什么直接“改变这条线”?您几乎不应该直接编辑.xcodeproj文件包中的任何内容。
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.
相反,您应该在构建设置中更改此设置。在您的情况下更具体,您需要添加几个构建配置,每个成员对应一个团队成员。然后,该成员可以使用他们自己的配置文件进行构建,而不会弄乱任何其他构建设置。