问题
This screen shot from the WWDC 2019 video 202 shows what the iCloud capability configuration in Xcode should look like:
The problem is that it doesn't. In the current version of Xcode 11 (11.1 and later) I no longer see "Use default container", and I can't get a container for this app to magically create itself. All I see is a list of custom containers.
How is this supposed to work? Is there no such thing as a default container any more? Am I supposed to make a container manually?
回答1:
That's pretty weird because neither the Xcode 11.1 Release Notes nor the documentation mention any change.
Practically the Default Container was the implicitly created container iCloud.$(PRODUCT_BUNDLE_IDENTIFIER)
.
Apparently Xcode 11.1 doesn't create a container anymore so you have to do it. Xcode doesn't even enable CloudKit in the capabilities after checking the CloudKit checkbox in a new project. I regard this as a bug.
回答2:
From what I gather from Apple's response to my report on this, this change is intentional.
来源:https://stackoverflow.com/questions/58487030/whats-happened-to-the-default-icloud-container-in-xcode