For using iCloud Documents, is Xcode > Preferences > Accounts > Apple ID's role admin?
I tested two accounts.
Result :
admin account - it has error that "Your account already has a valid iOS Development certificate".
member account - it has error that "Communication with Apple failed".
How to clear error that "Add the "iCloud containers" entitlement to your App ID"?