Type Method

containerWithIdentifier:

Returns the container object associated with the specified identifier.

Declaration

+ (CKContainer *)containerWithIdentifier:(NSString *)containerIdentifier;

Parameters

containerIdentifier

The bundle identifier of the app whose container you want to access. The bundle identifier must be in the app’s com.apple.developer.icloud-container-identifiers entitlement. This parameter must not be nil.

Return Value

The container object for the designated app’s content, or nil if the container cannot be found.

Discussion

The specified identifier must correspond to one of the ubiquity containers listed in the iCloud capabilities section of your Xcode project. Including the identifier with your app’s capabilities adds the corresponding entitlements to your app. To access your app’s default container, use the defaultContainer method instead.

See Also

Creating Container Objects

+ defaultContainer

Returns the default container object for managing the current app’s content.