Have you tried this?
viewContext.automaticallyMergesChangesFromParent = true
Post
Replies
Boosts
Views
Activity
I fixed this issue by deleting my existing, manually created identifier in my developer.apple.com account. I think the problem is that Xcode is trying to create a new identifier automatically on your behalf, but the identifier already exists in your account. After deleting the identifier on developer.apple.com, I clicked the "Try again" button in Xcode and it worked. It also created a new identifier with the prefix "XC ". I can only assume that the "XC " prefix indicates that it's an identifier managed automatically by Xcode.
Warning: My app has not yet been published to the App Store, so proceed with caution.
If you're new to development with Xcode, you may not be able to fully appreciate how much easier this is than it used to be, but this could very well create other issues if your app is already published. You may also want to try experimenting with unchecking the "Automatically manage signing" option, although this will, of course, mean that you'll have to handle all provisioning profiles, signing, entitlements, etc. on your own. Good luck.