Platforms to show: All Mac Windows Linux Cross-Platform

Back to CKRecordMBS class.

CKRecordMBS.allKeys as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns an array of strings corresponding to all keys currently in the record.

Returns an array of strings. The returned array contains only the keys that have corresponding values in the record. If no keys are set for the record, this method returns an empty array.

This method may not return all possible keys in the record. Specifically, the method does not return keys whose values are nil.

CKRecordMBS.allTokens as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns an array of strings that you can use for full-text searches of the field’s string-based values.

Returns an array of strings containing data from the records string-based fields.

When performing your own full-text searches, you can use this method to get a list of strings for your search. The method acts only on keys whose values are NSString objects. It breaks each value string apart at whitespace boundaries, creates new strings for each word, adds the new strings to an array, and returns the array. This tokenized version of the record’s string values makes it easier to do string-based comparisons of individual words.

CKRecordMBS.archive(byref error as NSErrorMBS) as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 21.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Archives the content of this record via NSKeyedArchiver.
Example
Dim ckRecord As New CKRecordMBS("MyType")

// archive
Dim e1 As NSErrorMBS
Dim encodedRecordValue As String = ckRecord.archive(e1)

// unarchive
Dim e2 As NSErrorMBS
Dim decodedRecord As CKRecordMBS = CKRecordMBS.Unarchive(encodedRecordValue, e2)

MsgBox "OK "+decodedRecord.recordType

In case of error returns nil and sets error.

CKRecordMBS.changedKeys as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns an array of strings representing the keys that have changed recently.

An array of strings, each of which represents a key whose value has changed since the record was downloaded or saved. If no keys have changed, this method returns an empty array.

CKRecordMBS.Constructor(Coder as NSCoderMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 21.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes record by reading from coder.

e.g. use with NSKeyedUnarchiverMBS class.

See also:

CKRecordMBS.Constructor(RecordType as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes and returns a new record of the specified type.
Example
// Create a new record of type "employee".
dim myRecord as new CKRecordMBS("employee")

recordType: A string reflecting the type of record that you want to create. This string becomes the type of record thereafter and cannot be changed. You define the record types that your app supports and use them to distinguish between records with different types of data. This parameter must not be nil or contain an empty string.

Record type names must consist of one or more alphanumeric characters and must start with a letter. Type names may include underscore characters as long as they do not start with that character. Spaces are not allowed in the names.

Returns an initialized record object or nil if the record cannot be created.

Use this method to initialize a new record object in the default zone of the database. The newly created record contains no data in any of its fields and is assigned a unique ID.

New records exist only in memory until you explicitly save them to iCloud. In addition, new records are sparse by default and have no values assigned to the fields you defined. (In fact, until you set the value of a key explicitly, getting the value of a key in a new record returns nil.) Even though a record has an associated type, that type information is ignored until you save the record.

Save the record using a CKModifyRecordsOperationMBS object or using the saveRecord method of CKDatabaseMBS to transfer the record’s contents to the server.

See also:

CKRecordMBS.Constructor(RecordType as String, recordID as CKRecordIDMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes and returns a record using an ID that you provide.

recordType: A string reflecting the type of record that you want to create. Define the record types that your app supports, and use them to distinguish between records with different types of data. This parameter must not be nil or contain an empty string. Record type names consist of one or more alphanumeric characters and start with a letter. Type names may include underscore characters if they do not start with that character. Spaces are not allowed in record type names.
recordID: The ID to assign to the record itself. When creating the ID, you can specify the zone in which to place the record. The ID cannot currently be in use by any other record and must not be nil.

Returns an initialized record object or nil if the record cannot be created.

Discussion
Use this method to initialize a new record object with the specified ID. The newly created record contains no data.

Upon creation, record objects exist only in memory on the local device. Save the record using a CKModifyRecordsOperationMBS object or using the saveRecord method of CKDatabaseMBS to transfer the record’s contents to the server.

See also:

CKRecordMBS.Constructor(RecordType as String, zoneID as CKRecordZoneIDMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes and returns a record in the specified zone.

recordType: A string reflecting the type of record that you want to create. Define the record types that your app supports, and use them to distinguish between records with different types of data. This parameter must not be nil or contain an empty string. Record type names consist of one or more alphanumeric characters and start with a letter. Type names may include underscore characters if they do not start with that character. Spaces are not allowed in record type names.
zoneID: The ID of the record zone in which to place the record.

Returns an initialized record object, or nil if the record cannot be created.

Use this method to initialize a new record object in the specified record zone.

Upon creation, the new record contains no data and exists only in memory on the local device. Save the record using a CKModifyRecordsOperationMBS object or using the saveRecord:completion: method of CKDatabase to transfer the record’s contents to the server.

See also:

CKRecordMBS.copy as CKRecordMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a copy of this object.

CKRecordMBS.dataForKey(key as string) as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
The value for the given key stored in the record as data.

If assign nil as value, CloudKit removes any object that the record associates with the key.
(Read and Write computed property)

CKRecordMBS.encodeSystemFieldsWithCoder(Coder as NSCoderMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 21.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Encodes the record’s system fields using the specified archiver.

Use this method to encode the record’s metadata that CloudKit provides. Every record has keys that the system defines that correspond to record metadata, such as the record ID, record type, creation date, and so on. This method encodes those keys in the specified archiver. This method doesn’t include any keys you add to the record. It also doesn’t encode the keys that the changedKeys() method returns.
You might use this method when you want to store only the system metadata because you store the actual record data elsewhere.

use with NSKeyedArchiverMBS class.

CKRecordMBS.encodeWithCoder(Coder as NSCoderMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 21.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Encodes this record with the given coder.

Best pass instance of NSKeyedArchiverMBS to encode.

CKRecordMBS.objectForKey(key as string) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
The value for the given key stored in the record.

key: The string that identifies a field in the record. Key names consist of one or more alphanumeric characters and start with a letter. You may also include underscore characters if you do not use an underscore as the first character in the name. Spaces are not allowed in key names.

Returns the object associated with the specified key or nil if no such key exists in the record.

New records do not contain any keys or values initially. Values are always one of the object types listed in Supported Data Types.

You access the fields of a CKRecord object the same way you access key-value pairs in an NSMutableDictionary. The CKRecord class defines the objectForKey: and setObject:forKey: methods for getting and setting values. It also supports dictionary index notation.

If assign nil as value, CloudKit removes any object that the record associates with the key.
(Read and Write computed property)

CKRecordMBS.setParentReferenceFromRecord(parentRecord as CKRecordMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates and sets a reference object for a parent from its record.

parentRecord: A record that you want to set as the parent to this record.

This method creates and sets a CKReferenceMBS object for the CKRecordMBS passed in. The resulting CKReferenceMBS will have its action set to none.

CKRecordMBS.setParentReferenceFromRecordID(parentRecordID as CKRecordIDMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets parent via Record ID.

CKRecordMBS.stringForKey(key as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes All
The value for the given key stored in the record as string.

If field contains a number, we convert it to string for you.

If assign "" as value, we put in an empty string. To clear the key, pass nil via objectForKey assignment.
(Read and Write computed property)

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...