With Xcode 7.3 I started seeing that issue.
Eugene Dubinin's solution did work, however it was causing issues with the same error if you're using App Groups.
It seems Xcode doesn't like at all you create the App IDs manually. I succeeded at fixing the issue by first deleting the manually created App ID on the developer portal. Then I let Xcode 'Fix the issue' by itself. The App ID got created successfully and the problem was solved.