I am trying to create an archive of an iOS app with Xcode to submit it to the App Store. However, the following error message pops up when I select \'iOS Device\' as target
For those who have the same problem: The issue in my case was that I had multiple certificates configured in the Apple Member Center. Xcode's automatic provisioning only seems to work with one certificate.
To solve that problem, you can just manually create a provisioning profile in the Member Center and import that into Xcode. For me, just double clicking the file worked. It didn't show any messages but I was able to use the profile afterwards (it might have also automatically pulled it from the Member Center...).
To actually use that profile, go into the Build Settings of your app. Under the section 'Code Signing', select the right certificate (the one you used to create the profile) and finally the Provisioning Profile itself. It should look something like that:
Now, you should be able to archive your app.
Huge thanks to brendan09 and Legolas-the-elf from reddit who helped me solve the issue: https://www.reddit.com/r/iOSProgramming/comments/2lsjpe/error_when_trying_to_create_archive_of_ios_app/