这可能是一个愚蠢的问题,但对于开发人员构建应用程序来说非常重要.
This might be a stupid question but very important one for developers to build applications.
我想问的是我们可以为xcode项目的开发和生产环境有条件地设置代码签名身份和配置文件吗?
因此,当我们为生产环境构建应用程序时,我们可以轻松地更改条件并立即为生产环境构建应用程序.否则我们还需要做很多事情,比如更改代码签名标识和配置文件以及包名称.
So when we build application for production environment we can easily change the condition and build application for production immediately. Otherwise we need to do many stuffs like change Code Signing Identity and Provisioning Profile and package name too.
那么是否可以应用这种条件,如果是,那么如何应用?
So is it possible to apply this kind of condition, if yes then how?
我很想知道这是怎么发生的.
I am very curious to know how this happens.
提前致谢.
推荐答案如果我理解正确,您也可以从 Xcode GUI 执行:
If I understand you correctly, you can also do it from the Xcode GUI:
使用 Apple 开发者网站创建开发和生产配置文件.
Create development and production provision profile using the Apple Developer Site.
在您的目标设置中,转到 Build Settings 并在搜索字段中输入 Code Sign.
In your target setting, go to Build Settings and write in the search field Code Sign.
打开配置文件左侧的小箭头.您可以看到,您可以针对开发配置文件进行调试,并针对发布配置您的生产(或 AdHoc)配置文件.
Open the small arrow on the left of the provisioning profile. You can see that you can configure for debug your development profile and for the release, your production (or AdHoc) profile.
转到左上角的方案菜单并选择Manage Scheme.
Go to you scheme menu on the top left corner and choose Manage Scheme.
给这个方案一个名字(我建议像 MyProjectRelease 这样的名字)并选择 Release 配置.
现在,在构建项目之前,您要做的就是更改所需的方案.
Now all you have to do before building your project, is change to the wanted scheme.
更多推荐
如何为生产和开发环境 iOS 设置不同的证书和配置文件?
发布评论