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.
If I understand you correctly, you can also do it from the Xcode GUI:
Create development and production provision profile using the Apple Developer Site.
In your target setting, go to
Build Settings
and write in the search fieldCode Sign
.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.
Go to you scheme menu on the top left corner and choose
Manage Scheme
.Duplicate
.Give this scheme a name (I suggest something like MyProjectRelease) and choose
Release
configuration.Now all you have to do before building your project, is change to the wanted scheme.