Platforms to show: All Mac Windows Linux Cross-Platform
CKRecordMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CloudKit | MBS Mac64bit Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Records are the fundamental objects you use to manage data in CloudKit. You may define any number of record types for your app, with each record type corresponding to a different type of information you need. Within a given record type, you then define one or more fields, each of which has a name and a data value. Records can contain simple data types such as strings and numbers or more complex types such as geographic locations or pointers to other records.
An important step in using CloudKit is defining the record types your app supports. Each new record object contains no keys or values initially. During development, you can add new keys and values at any time. The first time you set a value for a key and save the record, the server associates that type with the key for all records of the same type. (The CKRecordMBS class does not enforce these type constraints or do any local validation of a record’s contents; those constraints are enforced by the server when you save records.)
Note
The ability to add new keys is only possible during development. When you deploy to a production environment, the server returns an error when you try to specify an unknown record type or try to save a record containing unknown keys.
Although records act like dictionaries, there are still limitations to the types of values you can assign to keys. The following are the object types that the CKRecord class supports. Attempting to specify objects of any other type is a programmer error and will fail. Fields of all types are searchable unless otherwise noted.
see also
https://developer.apple.com/reference/cloudkit/ckrecord
- 15 properties
- property creationDate as Date
- property creationDateTime as DateTime
- property creatorUserRecordID as CKRecordIDMBS
- property Handle as Integer
- property lastModifiedUserRecordID as CKRecordIDMBS
- property modificationDate as Date
- property modificationDateTime as DateTime
- property parent as CKReferenceMBS
- property recordChangeTag as String
- property recordID as CKRecordIDMBS
- property recordType as String
- property share as CKReferenceMBS
- property dataForKey(key as string) as MemoryBlock
- property objectForKey(key as string) as Variant
- property stringForKey(key as string) as string
- 14 methods
- method allKeys as String()
- method allTokens as String()
- method archive(byref error as NSErrorMBS) as MemoryBlock
- method changedKeys as String()
- method Constructor Private
- method Constructor(Coder as NSCoderMBS)
- method Constructor(RecordType as String)
- method Constructor(RecordType as String, recordID as CKRecordIDMBS)
- method Constructor(RecordType as String, zoneID as CKRecordZoneIDMBS)
- method copy as CKRecordMBS
- method encodeSystemFieldsWithCoder(Coder as NSCoderMBS)
- method encodeWithCoder(Coder as NSCoderMBS)
- method setParentReferenceFromRecord(parentRecord as CKRecordMBS)
- method setParentReferenceFromRecordID(parentRecordID as CKRecordIDMBS)
- 3 shared methods
- shared method Available as Boolean
- shared method CKRecordTypeUserRecord as String
- shared method Unarchive(Data as MemoryBlock, byref error as NSErrorMBS) as CKRecordMBS
Sub classes:
Blog Entries
- MBS Xojo Plugins, version 21.5pr2
- MBS Xojo Plugins, version 21.3pr4
- News from the MBS Xojo Plugins Version 21.2
- MBS Xojo Plugins, version 21.2pr7
Release notes
- Version 21.5
- Fixed issue with CloudKit classes, where CKShareMBS was returned CKRecordMBS.
- Version 21.3
- Changed stringForKey in CKRecordMBS to pass empty string to CloudKit, when you pass empty Xojo string.
- Version 21.2
- Added Archive and Unarchive methods to CKRecordMBS and CKServerChangeTokenMBS classes.
Some methods using this class:
- CKDatabaseMBS.fetchRecordWithIDSync(recordID as CKRecordIDMBS, byref record as CKRecordMBS, byref error as NSErrorMBS)
- CKDatabaseMBS.saveRecord(record as CKRecordMBS, tag as Variant = nil)
- CKDatabaseMBS.saveRecordSync(record as CKRecordMBS, byref error as NSErrorMBS)
- CKModifyRecordsOperationMBS.Constructor(recordsToSave() as CKRecordMBS, recordIDsToDelete() as CKRecordIDMBS)
- CKModifyRecordsOperationMBS.recordsToSave as CKRecordMBS()
- CKModifyRecordsOperationMBS.setRecordsToSave(IDs() as CKRecordMBS)
- CKReferenceMBS.Constructor(record as CKRecordMBS, action as Integer = 0)
- CKShareMBS.Constructor(rootRecord as CKRecordMBS)
- CKShareMBS.Constructor(rootRecord as CKRecordMBS, shareID as CKRecordIDMBS)
Some properties using for this class:
- CKShareMetadataMBS.rootRecord as CKRecordMBS
Some events using this class:
- CKDatabaseMBS.fetchRecordWithIDCompleted(recordID as CKRecordIDMBS, record as CKRecordMBS, error as NSErrorMBS, tag as Variant)
- CKDatabaseMBS.performQueryCompleted(query as CKQueryMBS, zoneID as CKRecordZoneIDMBS, results() as CKRecordMBS, error as NSErrorMBS, tag as Variant)
- CKDatabaseMBS.saveRecordCompleted(record as CKRecordMBS, error as NSErrorMBS, tag as Variant)
- CKFetchRecordChangesOperationMBS.recordChanged(record as CKRecordMBS)
- CKFetchRecordsOperationMBS.RecordCompleted(record as CKRecordMBS, recordID as CKRecordIDMBS, error as NSErrorMBS)
- CKFetchRecordZoneChangesOperationMBS.recordChanged(record as CKRecordMBS)
- CKModifyRecordsOperationMBS.modifyRecordsCompleted(savedRecords() as CKRecordMBS, deletedRecordIDs() as CKRecordIDMBS, operationError as NSErrorMBS)
- CKModifyRecordsOperationMBS.RecordCompleted(record as CKRecordMBS, error as NSErrorMBS)
- CKModifyRecordsOperationMBS.RecordProgress(record as CKRecordMBS, progress as Double)
- CKQueryOperationMBS.recordFetched(record as CKRecordMBS)
Some related classes:
- class CKDatabaseMBS
- class CKFetchRecordsOperationMBS
- class CKFetchRecordZoneChangesOperationMBS
- class CKQueryMBS
- class CKQueryOperationMBS
- class CKRecordZoneIDMBS
- class CKServerChangeTokenMBS
- class CKShareMBS
- class CKShareMetadataMBS
- class NSErrorMBS
The items on this page are in the following plugins: MBS Mac64bit Plugin.
CKRecordIDMBS - CKRecordZoneIDMBS
