Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/contacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,10 @@ public interface CNLabelContactRelationKey {
}

public delegate void CNContactStoreRequestAccessHandler (bool granted, NSError error);
#if !XAMCORE_4_0
public delegate void CNContactStoreEnumerateContactsHandler (CNContact contact, bool stop);
#endif
public delegate void CNContactStoreListContactsHandler (CNContact contact, ref bool stop);

[iOS (9,0), Mac (10,11, onlyOn64: true)]
[BaseType (typeof (NSObject))]
Expand All @@ -441,9 +444,16 @@ public interface CNContactStore {
[Protected] // we cannot use ICNKeyDescriptor as Apple (and others) can adopt it from categories
NSObject GetUnifiedMeContact (NSArray keys, out NSError error);

#if !XAMCORE_4_0
[Obsolete ("Use the overload that takes CNContactStoreListContactsHandler instead")]
[Export ("enumerateContactsWithFetchRequest:error:usingBlock:")]
bool EnumerateContacts (CNContactFetchRequest fetchRequest, out NSError error, CNContactStoreEnumerateContactsHandler handler);

[Sealed] // We will introduce breaking changes anyways if XAMCORE_4_0 happens
#endif
[Export ("enumerateContactsWithFetchRequest:error:usingBlock:")]
bool EnumerateContacts (CNContactFetchRequest fetchRequest, out NSError error, CNContactStoreListContactsHandler handler);

[Export ("groupsMatchingPredicate:error:")]
CNGroup [] GetGroups ([NullAllowed] NSPredicate predicate, out NSError error);

Expand Down