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

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -