Skip to content

Commit 902406f

Browse files
feat: return identifier with contacts (#11)
Co-authored-by: Kishan Bagaria <KishanBagaria@users.noreply.github.com>
1 parent f5f49fd commit 902406f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Returns `Array<Object>` - Returns an array of contact objects.
5656

5757
The returned objects will take the following format:
5858

59+
* `identifier` String - The contact's unique identifier.
5960
* `firstName` String - The contact's first name, or an empty string ('') if one is not set.
6061
* `lastName` String - The contact's last name, or an empty string ('') if one is not set.
6162
* `nickname` String - The contact's nickname, or an empty string ('') if one is not set.
@@ -107,6 +108,7 @@ If a contact's full name is 'Shelley Vohr', I could pass 'Shelley', 'Vohr', or '
107108

108109
The returned object will take the following format:
109110

111+
* `identifier` String - The contact's unique identifier.
110112
* `firstName` String - The contact's first name, or an empty string ('') if one is not set.
111113
* `lastName` String - The contact's last name, or an empty string ('') if one is not set.
112114
* `nickname` String - The contact's nickname, or an empty string ('') if one is not set.

contacts.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@
143143

144144
// Default contact properties.
145145

146+
contact.Set("identifier", std::string([[cncontact identifier] UTF8String]));
147+
146148
contact.Set("firstName", std::string([[cncontact givenName] UTF8String]));
147149
contact.Set("lastName", std::string([[cncontact familyName] UTF8String]));
148150
contact.Set("nickname", std::string([[cncontact nickname] UTF8String]));

0 commit comments

Comments
 (0)