vanagar vanagar - 1 year ago 298
iOS Question

I get conflicting provisioning settings error when I try to archive to submit an iOS app

Now I'm trying to Product>Archive my iOS app to submit. However, I am getting following errors:

AppName has conflicting provisioning settings. AppName is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to
iPhone Developer
in the build settings editor, or switch to manual signing in the project editor.

Code signing is required for product type 'Application' in SDK 'iOS 10.1'

The situation won't change even those I've retry a whole process to recreate iOS certificates or provisioning profile.

I was setting as
iOS Distribution
TARGETS > Code Signing Identity > Release > Any iOS SDK
. When I changed the setting as
iOS Developer
here, and changed the setting in
PROJECTS > Code Signing Identity > Release > Any iOS SDK
iOS Distribution
, I've succeeded in archiving. I'm wondering is it necessary to set as
iOS Distribution
in the target editor or not. And if it's mandatory, please someone let me know how can I work around this error.

My XCode version is 8.1.

Answer Source

You are way over-thinking this. The process is vastly improved and extremely easy in Xcode 8. Take advantage of that fact.

Step One: Do not, in any way, shape, or form, attempt to set the Code Signing settings in the Build Settings. Don't go near them. You will absolutely mess this up. Instead, edit the target and do all the work in the General pane. Best approach: set yourself up for automatic code signing - just enter your Team and check the checkbox, like this:

enter image description here

Step Two: Make sure you have an iOS Distribution Identity (Certificate). You can check this under Xcode Preferences > Accounts, View Details. It would also be a good idea at this time to go to the member center and get yourself an App Store mobile provision for this app, and download and install it.

Step Three: Choose "Generic iOS Device" as your Destination, and choose Product > Archive. The app will be compiled, the archive is created, and you are now ready to submit to the App Store.