你能在Xcode中创建每用户项目设置吗?

时间:2021-05-05 15:02:13

I'm collaborating on an iPhone application, with the project files (.xcodeproj directory) checked into source control. One important setting is the "Code Signing Identity", which specifies the certificates to use to sign the application in order that it can run on the iPhone.

我在iPhone应用程序上进行协作,将项目文件(.xcodeproj目录)签入源代码控制。一个重要的设置是“代码签名身份”,它指定用于签署应用程序的证书,以便它可以在iPhone上运行。

Each developer on the project has his own Code Signing Identity, so whenever anyone makes a change to the project, his Code Signing Identity gets saved into the project settings, and then everyone else inherits that change. They then have to change that to their CSI before they can continue.

项目中的每个开发人员都有自己的代码签名标识,因此每当有人对项目进行更改时,他的代码签名标识都会保存到项目设置中,然后其他所有人都会继承该更改。然后,他们必须将其更改为CSI,然后才能继续。

Is there a way to have the Code Signing Identity saved in some local per-user project file that doesn't get checked into source control?

有没有办法让代码签名标识保存在一些本地的每用户项目文件中,而不会被检入源代码管理?

3 个解决方案

#1


You could base the Xcode project on an .xcconfig file, then make each developer use their own .xcconfig file and keep the identity setting in there.

您可以将Xcode项目基于.xcconfig文件,然后让每个开发人员使用他们自己的.xcconfig文件并在其中保留标识设置。

#2


Either that or have your source control system ignore the file that contains the signature, in git you can create a file called .gitignore, theres probably a similar thing for what you are using. It means even though you've changed it the change won't get mirrored.

无论是那个或者你的源代码控制系统都忽略了包含签名的文件,在git中你可以创建一个名为.gitignore的文件,这可能与你正在使用的东西类似。这意味着即使你已经改变它,改变也不会被镜像。

#3


I worked around this by making different builds. The one named "Dev - Rob" had my settings in it, and the one named "Dev - [Other Guy's Name]" had Other Guy's settings.

我通过制作不同的版本来解决这个问题。名为“Dev - Rob”的名字中有我的设置,名为“Dev - [Other Guy's Name]”的名字有其他人的设置。

We also used this to make builds like "Release - Beta" and "Release - AppStore" etc., for all situations where we'd have different signing configurations.

我们还使用它来制作类似“Release - Beta”和“Release - AppStore”等的构建,适用于我们有不同签名配置的所有情况。

#1


You could base the Xcode project on an .xcconfig file, then make each developer use their own .xcconfig file and keep the identity setting in there.

您可以将Xcode项目基于.xcconfig文件,然后让每个开发人员使用他们自己的.xcconfig文件并在其中保留标识设置。

#2


Either that or have your source control system ignore the file that contains the signature, in git you can create a file called .gitignore, theres probably a similar thing for what you are using. It means even though you've changed it the change won't get mirrored.

无论是那个或者你的源代码控制系统都忽略了包含签名的文件,在git中你可以创建一个名为.gitignore的文件,这可能与你正在使用的东西类似。这意味着即使你已经改变它,改变也不会被镜像。

#3


I worked around this by making different builds. The one named "Dev - Rob" had my settings in it, and the one named "Dev - [Other Guy's Name]" had Other Guy's settings.

我通过制作不同的版本来解决这个问题。名为“Dev - Rob”的名字中有我的设置,名为“Dev - [Other Guy's Name]”的名字有其他人的设置。

We also used this to make builds like "Release - Beta" and "Release - AppStore" etc., for all situations where we'd have different signing configurations.

我们还使用它来制作类似“Release - Beta”和“Release - AppStore”等的构建,适用于我们有不同签名配置的所有情况。