Ios – 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 in 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 as 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.

Best Solution

I had this same error, but I had already checked "Automatically manage signing".

The solution was to uncheck it, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own.