Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

CNContactStoreMBS.allContacts(byref error as NSErrorMBS) as CNContactMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 18.4 Yes No No Yes, macOS only No
Function: Searches all contacts.
Notes: Same as ContactsWithFetchRequest function with key list from CNContactStoreMBS.AllFetchKeys function.

Feedback, Comments & Corrections

CNContactStoreMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: The constructor.

Feedback, Comments & Corrections

CNContactStoreMBS.ContactsWithFetchRequest(fetchRequest as CNContactFetchRequestMBS, byref error as NSErrorMBS) as CNContactMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Returns all contacts matching a contact fetch request.
Notes:
fetchRequest: The contact fetch request that specifies the search criteria.
error: Error information, if an error occurred.

This method waits until the enumeration is finished. If there are no results, the method returns an empty array.
This can be used to fetch all contacts without keeping all of them at once in memory because this is expensive.

Your app must be code signed to see contacts.

Feedback, Comments & Corrections

CNContactStoreMBS.containersMatchingPredicate(predicate as NSPredicateMBS, byref error as NSErrorMBS) as CNContainerMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Fetches all containers matching the specified predicate.
Notes:
predicate: The predicate to use to fetch matching containers. Set this property to nil to match all containers.
error: Error information, if an error occurred.

Returns an array of CNContainer objects that match the predicate.

A container holds a collection of contacts, a contact (each contact can be in only one container). CardDAV accounts usually have only one container of contacts. Exchange accounts may have multiple containers, where each container represents an Exchange folder.

This method returns an empty array when no matching container is found. In case of an error this method returns nil. You should use only the predicates defined CNContainer class. Compound predicates are not supported.

Feedback, Comments & Corrections

CNContactStoreMBS.defaultContainerIdentifier as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Returns the identifier of the default container.
Notes: This identifier can be used to fetch a default container. A default container is where the user wants new contacts to be added implicitly.

Feedback, Comments & Corrections

CNContactStoreMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: The destructor.

Feedback, Comments & Corrections

CNContactStoreMBS.enumerateContactsWithFetchRequest(fetchRequest as CNContactFetchRequestMBS, byref error as NSErrorMBS, tag as Variant = nil) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Returns a Boolean value that indicates whether the enumeration of all contacts matching a contact fetch request executed successfully.
Notes:
fetchRequest: The contact fetch request that specifies the search criteria.
error: Error information, if an error occurred.

Calls enumerateContactsWithFetchRequest event for each contact found.

Returns true if enumeration of all contacts matching a contact fetch request executes successfully; otherwise, false.

This method waits until the enumeration is finished. If there are no results, the event is not called and the method returns true.

This can be used to fetch all contacts without keeping all of them at once in memory because this is expensive.

See also:

Feedback, Comments & Corrections

CNContactStoreMBS.executeSaveRequest(saveRequest as CNSaveRequestMBS, byref Error as NSErrorMBS) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Executes a save request and returns success or failure.
Notes:
saveRequest: The save request to execute.
error: Error information, if an error occurred.

Returns true if the save request executes successfully; otherwise, false.

It is recommended that you do not access objects in the save request from other threads when it is in the process of being executed, because it may modify the contacts in the process. A save request only applies the changes to the objects. If there are overlapping changes with multiple or concurrent CNSaveRequest then the last saved change wins.

Feedback, Comments & Corrections

CNContactStoreMBS.groupsByName(name as String, byref error as NSErrorMBS) as CNGroupMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 18.4 Yes No No Yes, macOS only No
Function: Looks for groups with matching names.
Notes:
Returns empty array if nothing found.
Comparison is localized case insensitive.

Feedback, Comments & Corrections

CNContactStoreMBS.groupsForContact(contact as CNContactMBS, byref error as NSErrorMBS) as CNGroupMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 18.4 Yes No No Yes, macOS only No
Function: Searches all groups for a given contact.

Feedback, Comments & Corrections

CNContactStoreMBS.groupsMatchingPredicate(predicate as NSPredicateMBS, byref error as NSErrorMBS) as CNGroupMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Fetches all groups matching the specified predicate.
Notes:
predicate: The predicate to use to fetch the matching groups. Set predicate to nil to match all groups.
error: Error information, if an error occurred.

Returns an array of CNGroup objects that match the predicate.

This method returns an empty array when no matching groups are found. If an error occurs, this method returns nil. You should use only the predicates defined in CNGroup class predicates. Compound predicates are not supported. Contacts may be members of one or more groups, depending upon the account they come from.

Feedback, Comments & Corrections

CNContactStoreMBS.requestAccessForEntityType(entityType as Integer = 0, tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Requests access to the user's contacts.
Notes:
entityType: Set to CNEntityTypeContacts.

Users are able to grant or deny access to contact data on a per-application basis. Request access to contact data by calling requestAccessForEntityType method. This will not block your application while the user is being asked for permission. The user will only be prompted the first time access is requested; any subsequent CNContactStore calls will use the existing permissions. The requestAccessForEntityType event is later called. This method is optional when CNContactStore is used in the background thread. If this method is not used, CNContactStore may block your application while the user is asked for access permission.

Your app must be code signed to see contacts.

See also:

Feedback, Comments & Corrections

CNContactStoreMBS.unifiedContactsMatchingPredicate(predicate as NSPredicateMBS, byref error as NSErrorMBS) as CNContactMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 18.4 Yes No No Yes, macOS only No
Function: Fetches all unified contacts matching the specified predicate.
Notes:
predicate: The predicate to match against.
error: Error information, if an error occurred.

Returns an array of CNContact objects matching the predicate.

If no matches are found, this method returns an empty array (or nil in case of error). Use only the predicates from the CNContact class predicates. Compound predicates are not supported by this method. Due to unification, the returned contacts may have different identifiers than you specify. To fetch all contacts, use enumerateContactsWithFetchRequest.

Same as other unifiedContactsMatchingPredicate function with key list from CNContactStoreMBS.AllFetchKeys function.

See also:

Feedback, Comments & Corrections

CNContactStoreMBS.unifiedContactsMatchingPredicate(predicate as NSPredicateMBS, keysToFetch() as CNKeyDescriptorMBS, byref error as NSErrorMBS) as CNContactMBS()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Fetches all unified contacts matching the specified predicate.
Notes:
predicate: The predicate to match against.
keys: The properties to fetch in the returned CNContact objects. You should fetch only the properties that you plan to use. Note that you can combine contact keys and contact key descriptors.
error: Error information, if an error occurred.

Returns an array of CNContact objects matching the predicate.

If no matches are found, this method returns an empty array (or nil in case of error). Use only the predicates from the CNContact class predicates. Compound predicates are not supported by this method. Due to unification, the returned contacts may have different identifiers than you specify. To fetch all contacts, use enumerateContactsWithFetchRequest.

See also:

Feedback, Comments & Corrections

CNContactStoreMBS.unifiedContactWithIdentifier(identifier as string, byref error as NSErrorMBS) as CNContactMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 18.4 Yes No No Yes, macOS only No
Function: Fetches a unified contact for the specified contact identifier.
Notes:
identifier: The identifier of the contact to fetch.
error: Error information, if an error occurred.

Returns an unified contact matching or linked to the identifier.

Due to unification, the returned contact may have a different identifier, than you specify. To fetch a batch of contacts by identifiers use predicateForContactsWithIdentifiers with unifiedContactsMatchingPredicate. It is recommended to fetch only the properties that will be used. You can combine contact keys and contact key descriptors together.

Same as other unifiedContactWithIdentifier function with key list from CNContactStoreMBS.AllFetchKeys function.

See also:

Feedback, Comments & Corrections

CNContactStoreMBS.unifiedContactWithIdentifier(identifier as string, keys() as CNKeyDescriptorMBS, byref error as NSErrorMBS) as CNContactMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Fetches a unified contact for the specified contact identifier.
Notes:
identifier: The identifier of the contact to fetch.
keys: The properties to fetch in the returned CNContact object.
error: Error information, if an error occurred.

Returns an unified contact matching or linked to the identifier.

Due to unification, the returned contact may have a different identifier, than you specify. To fetch a batch of contacts by identifiers use predicateForContactsWithIdentifiers with unifiedContactsMatchingPredicate. It is recommended to fetch only the properties that will be used. You can combine contact keys and contact key descriptors together.

See also:

Feedback, Comments & Corrections

CNContactStoreMBS.unifiedMeContact(byref error as NSErrorMBS) as CNContactMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 18.4 Yes No No Yes, macOS only No
Function: Queries an unified contact for the user.
Notes: Same as unifiedMeContactWithKeysToFetch function with key list from CNContactStoreMBS.AllFetchKeys function.

Feedback, Comments & Corrections

CNContactStoreMBS.unifiedMeContactWithKeysToFetch(keys() as CNKeyDescriptorMBS, byref error as NSErrorMBS) as CNContactMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Queries an unified contact for the user.

Feedback, Comments & Corrections

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




Links
MBS Xojo PDF Plugins