ios - kABPersonEmailProperty returns weird stuff -



ios - kABPersonEmailProperty returns weird stuff -

i tring email address of abrecordref this:

abrecordref ref = cfarraygetvalueatindex( allpeople, ); nsstring *email = [(nsstring*) abrecordcopyvalue( ref, kabpersonemailproperty ) autorelease]; nslog(@"%@", email);

it returning this:

_$!<home>!$_ (0x6840af0) - test@test.com (0x6840cc0)

what's stuff around email? , how can rid of it?thanks.

kabpersonemailproperty of type kabmultistringpropertytype. there no single email address property, person might have email address work, 1 home, etc. can array of email addresses using abmultivaluecopyarrayofallvalues:

abmultivalueref emailmultivalue = abrecordcopyvalue(ref, kabpersonemailproperty); nsarray *emailaddresses = [(nsarray *)abmultivaluecopyarrayofallvalues(emailmultivalue) autorelease]; cfrelease(emailmultivalue);

to labels of email addresses, utilize abmultivaluecopylabelatindex. "_$!<home>!$" special constant that's defined kabhomelabel, there's kabworklabel.

ios cocoa-touch abaddressbook

Comments

Popular posts from this blog

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -