I’ve seen this before and it looks like it can happen for a few different reasons. One time for me it was just Xcode caching provisioning profile information and not updating to match the CloudKit entitlements. Deleting derived data and restarting Xcode might be worth a try.
Another place where I saw this was someone was trying to set `Production` for this value but hadn’t pushed their schema to production yet, so Xcode hadn’t updated the profile: See OlivaresF’s comment on http://stackoverflow.com/a/36870837/3203924
I also saw this once when trying to hit the Production Environment while testing a Mac App (https://forums.developer.apple.com/thread/17499). This is currently not supported (although I think Apple is changing that soon https://developer.apple.com/videos/play/wwdc2016/226/)