ios獲得通訊錄中聯絡人的所有屬性

2021-06-06 14:56:13 字數 1074 閱讀 2477

獲得通訊錄中聯絡人的所有屬性abaddressbookref addressbook = abaddressbookcreate();

cfarrayref results = abaddressbookcopyarrayofallpeople(addressbook);

for(int i = 0; i < cfarraygetcount(results); i++)

//讀取位址多值

abmultivalueref address = abrecordcopyvalue(person, kabpersonaddressproperty);

int count = abmultivaluegetcount(address);

for(int j = 0; j < count; j++)

//獲取dates多值

abmultivalueref dates = abrecordcopyvalue(person, kabpersondateproperty);

int datescount = abmultivaluegetcount(dates);

for (int y = 0; y < datescount; y++)

//獲取kind值

cfnumberref recordtype = abrecordcopyvalue(person, kabpersonkindproperty);

if (recordtype == kabpersonkindorganization) else

//獲取im多值

abmultivalueref instantmessage = abrecordcopyvalue(person, kabpersoninstantmessageproperty);

for (int l = 1; l < abmultivaluegetcount(instantmessage); l++)

//讀取**多值

abmultivalueref phone = abrecordcopyvalue(person, kabpersonphoneproperty);

for (int k = 0; k

獲得通訊錄中聯絡人的所有屬性

獲得通訊錄中聯絡人的所有屬性 abaddressbookref addressbook abaddressbookcreate cfarrayref results abaddressbookcopyarrayofallpeople addressbook for int i 0 i cfarray...

獲得通訊錄中聯絡人的所有屬性

獲得通訊錄中聯絡人的所有屬性 看 abaddressbookref addressbook abaddressbookcreate cfarrayref results abaddressbookcopyarrayofallpeople addressbook for int i 0 i cfarr...

獲得通訊錄中聯絡人的所有屬性

abaddressbookref addressbook abaddressbookcreate cfarrayref results abaddressbookcopyarrayofallpeople addressbook for int i 0 i cfarraygetcount result...