How to acess contacts of iPhone in IOS 6

后端 未结 3 1468
一整个雨季
一整个雨季 2021-01-03 16:53

I want to show contacts and details of contacts in my application.List of contacts and after selecting any contact details of that contact will show on next page using addre

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-03 17:36

    use

    ABRecordID recordId;
    ABAddressBookRef _addressBookRef = ABAddressBookCreate ();
    NSArray* allPeople = (NSArray *)ABAddressBookCopyArrayOfAllPeople(_addressBookRef);
    NSString* compositeName = (NSString *)ABRecordCopyCompositeName((ABRecordRef)record);
    recordId = ABRecordGetRecordID(record);
    ABMultiValueRef emails = ABRecordCopyValue(record, kABPersonEmailProperty);
    

    Do proper release just a snippet

提交回复
热议问题