Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Contacts] Fix wrong delegate signature on CNContactStoreEnumerateContactsHandler #22

Merged
merged 1 commit into from
May 3, 2016
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