ios - iOS9 - CNContactPickerViewController : SelectionOfProperty is not working, if user have multiple phone numbers -


selectionofproperty not working if user has multiple phone numbers.

i using below code:

let picker = cncontactpickerviewcontroller() picker.displayedpropertykeys = [cncontactphonenumberskey]  picker.predicateforenablingcontact = nspredicate(format: "phonenumbers.@count > 0")  picker.predicateforselectionofcontact = nspredicate(value: false)   picker.predicateforselectionofproperty = nspredicate(format: "key == 'phonenumbers'") picker.delegate = self 

it's working fine when using emailaddresses, not when changed phonenumbers.

if have multiple phone numbers set predicateforenablingcontact as

picker.predicateforenablingcontact = nspredicate(format: "phonenumbers.@count > 1") 

set predicate format "phonenumbers.@count > 1"


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -