Platforms to show: All Mac Windows Linux Cross-Platform
CKContainerMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CloudKit | MBS Mac64bit Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A container object manages all explicit and implicit attempts to access the contents of the container.
Every app has a default container object that manages its own native content. If you develop a suite of apps, you can also access any container objects for which you have the appropriate entitlements. Each new container distinguishes between publicly available data and data that is private to the current user. Private data is always stored in the appropriate container directory in the user’s iCloud account.
see
https://developer.apple.com/reference/cloudkit/ckcontainer
- 17 events
- event accountStatusCompleted(accountStatus as Integer, error as NSErrorMBS, tag as Variant)
- event discoverAllContactUserInfosCompleted(userRecordID() as CKDiscoveredUserInfoMBS, error as NSErrorMBS, tag as Variant)
- event discoverAllIdentitiesWithCompleted(userRecordID() as CKUserIdentityMBS, error as NSErrorMBS, tag as Variant)
- event discoverUserIdentityWithEmailAddressCompleted(emailAddress as String, userInfo as CKUserIdentityMBS, error as NSErrorMBS, tag as Variant)
- event discoverUserIdentityWithPhoneNumberCompleted(phoneNumber as String,userInfo as CKUserIdentityMBS, error as NSErrorMBS, tag as Variant)
- event discoverUserIdentityWithUserRecordIDCompleted(userRecordID as CKRecordIDMBS, userInfo as CKUserIdentityMBS, error as NSErrorMBS, tag as Variant)
- event discoverUserInfoWithEmailAddressCompleted(emailAddress as String, userInfo as CKDiscoveredUserInfoMBS, error as NSErrorMBS, tag as Variant)
- event discoverUserInfoWithUserRecordIDCompleted(userRecordID as CKRecordIDMBS, userInfo as CKDiscoveredUserInfoMBS, error as NSErrorMBS, tag as Variant)
- event fetchAllLongLivedOperationIDsCompleted(outstandingOperationIDs() as String, error as NSErrorMBS, tag as Variant)
- event fetchLongLivedOperationWithIDCompleted(operationID as String, outstandingOperation as CKOperationMBS, error as NSErrorMBS, tag as Variant)
- event fetchShareParticipantWithEmailAddressCompleted(emailAddress as String, shareParticipant as CKShareParticipantMBS, error as NSErrorMBS, tag as Variant)
- event fetchShareParticipantWithPhoneNumberCompleted(phoneNumber as String,shareParticipant as CKShareParticipantMBS, error as NSErrorMBS, tag as Variant)
- event fetchShareParticipantWithUserRecordIDCompleted(userRecordID as CKRecordIDMBS, shareParticipant as CKShareParticipantMBS, error as NSErrorMBS, tag as Variant)
- event fetchUserRecordIDCompleted(userRecordID as CKRecordIDMBS, error as NSErrorMBS, tag as Variant)
- event registerCloudKitShareWithPreparationHandler(ServiceItems as Variant, byref share as CKShareMBS, byref container as CKContainerMBS, byref error as NSErrorMBS, tag as variant)
- event requestApplicationPermissionCompleted(applicationPermissionStatus as Integer, accountStatus as Integer, error as NSErrorMBS, tag as Variant)
- event statusForApplicationPermissionCompleted(applicationPermissionStatus as Integer, accountStatus as Integer, error as NSErrorMBS, tag as Variant)
- 5 properties
- property containerIdentifier as String
- property Handle as Integer
- property privateCloudDatabase as CKDatabaseMBS
- property publicCloudDatabase as CKDatabaseMBS
- property sharedCloudDatabase as CKDatabaseMBS
- 21 methods
- method accountStatus(tag as Variant = nil)
- method addOperation(operation as CKOperationMBS)
- method Constructor
- method Constructor(Container as CKContainerMBS)
- method discoverAllContactUserInfos(tag as Variant = nil)
- method discoverAllIdentities(tag as Variant = nil)
- method discoverUserIdentityWithEmailAddress(emailAddress as string, tag as Variant = nil)
- method discoverUserIdentityWithPhoneNumber(phoneNumber as string, tag as Variant = nil)
- method discoverUserIdentityWithUserRecordID(userRecordID as CKRecordIDMBS, tag as Variant = nil)
- method discoverUserInfoWithEmailAddress(emailAddress as string, tag as Variant = nil)
- method discoverUserInfoWithUserRecordID(userRecordID as CKRecordIDMBS, tag as Variant = nil)
- method fetchAllLongLivedOperationIDs(tag as Variant = nil)
- method fetchLongLivedOperationWithID(operationID as string, tag as Variant = nil)
- method fetchShareParticipantWithEmailAddress(emailAddress as string, tag as Variant = nil)
- method fetchShareParticipantWithPhoneNumber(phoneNumber as string, tag as Variant = nil)
- method fetchShareParticipantWithUserRecordID(userRecordID as CKRecordIDMBS, tag as Variant = nil)
- method fetchUserRecordID(tag as Variant = nil)
- method registerCloudKitShare(Share as CKShareMBS, ServiceItems as Variant)
- method registerCloudKitShareWithPreparationHandler(ServiceItems as Variant, tag as variant = nil)
- method requestApplicationPermission(applicationPermission as Integer, tag as Variant = nil)
- method statusForApplicationPermission(applicationPermission as Integer, tag as Variant = nil)
- 12 shared methods
- shared method Available as Boolean
- shared method CKAccountChangedNotification as String
- shared method CKCurrentUserDefaultName as String
- shared method CKErrorDomain as String
- shared method CKErrorRetryAfterKey as String
- shared method CKOwnerDefaultName as String
- shared method CKPartialErrorsByItemIDKey as String
- shared method CKRecordChangedErrorAncestorRecordKey as String
- shared method CKRecordChangedErrorClientRecordKey as String
- shared method CKRecordChangedErrorServerRecordKey as String
- shared method containerWithIdentifier(name as string) as CKContainerMBS
- shared method defaultContainer as CKContainerMBS
- 42 constants
Constants
Constant | Value | Description |
---|---|---|
CKApplicationPermissionStatusCouldNotComplete | 1 |
One of the constants indicating whether the app has been granted a specific permission.
An error occurred during the getting or setting of the app permission. Consult the provided NSErrorMBS object for more information. |
CKApplicationPermissionStatusDenied | 2 |
One of the constants indicating whether the app has been granted a specific permission.
The user denied access to the permission. |
CKApplicationPermissionStatusGranted | 3 |
One of the constants indicating whether the app has been granted a specific permission.
The user granted access to the permission. |
CKApplicationPermissionStatusInitialState | 0 |
One of the constants indicating whether the app has been granted a specific permission.
The user has not yet decided whether to grant this permission. Use the requestApplicationPermission method to ask the user to grant the permission. |
CKApplicationPermissionUserDiscoverability | 1 | The current user is discoverable (through the user’s email address) to other users of the app. |
Status
Constant | Value | Description |
---|---|---|
CKAccountStatusAvailable | 1 |
The user’s iCloud account is available and may be used by this app. |
CKAccountStatusCouldNotDetermine | 0 |
An error occurred during an attempt to retrieve the account status. Consult the provided NSError object for more information. |
CKAccountStatusNoAccount | 3 |
The user’s iCloud account is not available because no account information has been provided for this device. |
CKAccountStatusRestricted | 2 |
The user’s iCloud account is not available. Access was denied due to Parental Controls or Mobile Device Management restrictions. |
Errors
Constant | Value | Description |
---|---|---|
ErrorAlreadyShared | 30 |
A record/share cannot be saved, doing so would cause a hierarchy of records to exist in multiple shares. |
ErrorAssetFileModified | 17 |
Asset file content was modified while being saved. |
ErrorAssetFileNotFound | 16 |
Asset file was not found. |
ErrorBadContainer | 5 |
Un-provisioned or unauthorized container. Try provisioning the container before retrying the operation. |
ErrorBadDatabase | 24 |
Operation could not be completed on the given database. Likely caused by attempting to modify zones in the public database. |
ErrorBatchRequestFailed | 22 |
One of the items in this batch operation failed in a zone with atomic updates, so the entire batch was rejected. |
ErrorChangeTokenExpired | 21 |
The previousServerChangeToken value is too old and the client must re-sync from scratch. |
ErrorConstraintViolation | 19 |
The server rejected the request because there was a conflict with a unique field. |
ErrorIncompatibleVersion | 18 |
App version is less than the minimum allowed version. |
ErrorInternalError | 1 |
CloudKit.framework encountered an error. This is a non-recoverable error. |
ErrorInvalidArguments | 12 |
Bad client request (bad record graph, malformed predicate) |
ErrorLimitExceeded | 27 |
The request to the server was too large. Retry this request as a smaller batch. |
ErrorManagedAccountRestricted | 32 |
Request was rejected due to a managed account restriction. |
ErrorMissingEntitlement | 8 |
Missing entitlement |
ErrorNetworkFailure | 4 |
Network error (available but CFNetwork gave us an error) |
ErrorNetworkUnavailable | 3 |
Network not available |
ErrorNotAuthenticated | 9 |
Not authenticated (writing without being logged in, no user record) |
ErrorOperationCancelled | 20 |
A CKOperation was explicitly cancelled. |
ErrorPartialFailure | 2 |
Some items failed, but the operation succeeded overall. Check CKPartialErrorsByItemIDKey in the userInfo dictionary for more details. |
ErrorParticipantMayNeedVerification | 33 |
Share Metadata cannot be determined, because the user is not a member of the share. There are invited participants on the share with email addresses or phone numbers not associated with any iCloud account. The user may be able to join the share if they can associate one of those email addresses or phone numbers with their iCloud account via the system Share Accept UI. Call UIApplication's openURL on this share URL to have the user attempt to verify their information. |
ErrorPermissionFailure | 10 |
Access failure (save, fetch, or shareAccept) |
ErrorQuotaExceeded | 25 |
Saving a record would exceed quota |
ErrorReferenceViolation | 31 |
The target of a record's parent or share reference was not found. |
ErrorRequestRateLimited | 7 |
Client is being rate limited |
ErrorResultsTruncated | 13 |
Results Truncated. Deprecated and will not be returned. |
ErrorServerRecordChanged | 14 |
The record was rejected because the version on the server was different. |
ErrorServerRejectedRequest | 15 |
The server rejected this request. This is a non-recoverable error. |
ErrorServiceUnavailable | 6 |
Service unavailable |
ErrorTooManyParticipants | 29 |
A share cannot be saved because there are too many participants attached to the share. |
ErrorUnknownItem | 11 |
Record does not exist |
ErrorUserDeletedZone | 28 |
The user deleted this zone through the settings UI. Your client should either remove its local data or prompt the user before attempting to re-upload any data to this zone. |
ErrorZoneBusy | 23 |
The server is too busy to handle this zone operation. Try the operation again in a few seconds. |
ErrorZoneNotFound | 26 |
The specified zone does not exist on the server. |
This class has no sub classes.
Some methods using this class:
- CKDatabaseMBS.Constructor(Container as CKContainerMBS, databaseScope as Integer)
Some properties using for this class:
- CKOperationConfigurationMBS.Container as CKContainerMBS
Some events using this class:
- CKContainerMBS.registerCloudKitShareWithPreparationHandler(ServiceItems as Variant, byref share as CKShareMBS, byref container as CKContainerMBS, byref error as NSErrorMBS, tag as variant)
Blog Entries
- News from the MBS Xojo Plugins Version 21.3
- MBS Xojo Plugins, version 21.3pr1
- MBS Xojo Plugins, version 21.2pr4
Release notes
- Version 21.3
- Added registerCloudKitShare and registerCloudKitShareWithPreparationHandler to CKContainerMBS class.
- Version 21.2
- Added new constructor for CKContainerMBS class to create a copy with your subclass.
The items on this page are in the following plugins: MBS Mac64bit Plugin.