When I try to enable iCloud (iCloud Documents) in General tab,
It shows below alerts and can not build.
⚠ Add the iCloud feature to your App ID.
⚠ Add iCloud Containers to your App ID.
Alearts in General tab
⚠ Automatic signing is unable to resolve an issue with the "Target" target's entitlements.
⚠ Provisioning profile "iOS Team Provisioning Profile: com.***.xxxx" doesn't match the entitlements file's values for the com.apple.developer.icloud-container-identifiers and com.apple.developer.ubiquity-container-identifiers entitlements.
This error only appears when I try to enable with new app.
My previous apps(enabled iCloud feature with Xcode 8) can build and run.
These previous apps also shows "⚠Add iCloud Containers to your App ID." error, but can build and run.
I had a similar issue. "Add iCloud Containers to your App ID" would always give an error despite all settings to be correct.
I found a workaround that fixes the error:
-Deliberately edit the bundle identifier with a wrong value
-Click away and allow errors to appear from the erroneous bundle id
-Then retype the correct bundle id. This allows the iCloud Container to restore itself.