How setup different certificates and provisioning profile for production and development environment iOS?

亡梦爱人 提交于 2020-01-05 09:09:06

问题


This might be a stupid question but very important one for developers to build applications.

I just want to ask is Can we set up Code Signing Identity and Provisioning Profile conditionally for Development and Production environment for a xcode project?

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.

Thanks in advance.


回答1:


If I understand you correctly, you can also do it from the Xcode GUI:

  1. Create development and production provision profile using the Apple Developer Site.

  2. In your target setting, go to Build Settings and write in the search field Code Sign.

  1. 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.

  2. Go to you scheme menu on the top left corner and choose Manage Scheme.

  1. You probably have only one scheme configured, so select it (by pressing on it once) and press on the settings button on the bottom left corner. Choose Duplicate.

  1. Give this scheme a name (I suggest something like MyProjectRelease) and choose Release configuration.

  2. Now all you have to do before building your project, is change to the wanted scheme.



来源:https://stackoverflow.com/questions/30543709/how-setup-different-certificates-and-provisioning-profile-for-production-and-dev

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!