How to get an email using ABPeoplePicker?

前端 未结 2 1845
礼貌的吻别
礼貌的吻别 2021-01-23 22:38

I\'m not finding Apple\'s documentation very helpful for actually getting data with a people picker, and there doesn\'t seem to be much other information on the internet :( I as

2条回答
  •  面向向阳花
    2021-01-23 23:12

    Use

    ABMultiValueRef emails = ABRecordCopyValue(record, kABPersonEmailProperty);
    

    After that, you can use the ABMultiValueRefs API method calls to get email address.

    EDIT -- This should give you email

    CFStringRef emailId = ABMultiValueCopyValueAtIndex(emails, identifier);
    

提交回复
热议问题