How to get phone number from address book as string?

前端 未结 4 1045
耶瑟儿~
耶瑟儿~ 2021-02-06 16:59

I have a text field with a contact name and I want to get the phone number for that:

ABAddressBookRef adressBook = ABAddressBookCreate();

NSArray *people = (NSA         


        
4条回答
  •  灰色年华
    2021-02-06 17:36

    NSMutableArray *phoneNumbers = [[[NSMutableArray alloc] init] autorelease];
    ABMultiValueRef multiPhones = ABRecordCopyValue(person,kABPersonPhoneProperty);
    for(CFIndex i=0;i

提交回复
热议问题