Holy molly, I had to do all this in order for it to work. A picture is worth a thousand words.
-
If you get this error while archiving then continue reading.
-
Go to your app and click on the general tab. Under the signing section, uncheck “Automatically manage signing”. As soon as you do that you will get a status of red error as shown below.
-
Now here’s the tricky part. You need to uncheck “Automatically manage Signing” in both the targets under your project. This step is very important.
-
Now go under “build settings” tab of each of those targets and set “iOS Developer” under code signing identity. Do the same steps for your “PROJECT”.
-
Now do Xcode → Product → Clean. Close your project in Xcode and reopen it again.
-
After this go to the general tab of each of your targets and check “Automatically manage signing” and under team drop down select your developer account
-
Do an archive of your project again and everything should work.
Really, Apple? Was this supposed to make our lives easier?