Use Xcode's project navigator to find the identifiers of active CloudKit containers.
An app's Xcode project manages which CloudKit containers are available to that app. When you write code that needs to provide container identifiers for all of the containers your app uses, reference the list of active containers in Xcode.
Identify the Containers Your App Uses
In your app's Xcode project, select Capabilities > iCloud in the project navigator.
Once you've identified the containers your app uses, you can initialize instances of
CKContainer in your app to interact with CloudKit data.