cocoa - IPhone SDK - How to serialize ABRecord? -


i'm new in iphone development, can advice me how serialize adressbook records?
have read stackoverflow - how serialize simple object in iphone sdk, still have questions: should extend abrecordref? possible? or should implement own class nsobject?

(similar question on mac forums , left without answer)

thank you!

abrecord opaque c type. not object in sense of objective-c. means can not extend it, can not add category on it, can not message it. thing can call functions described in abrecord reference abrecord parameter.

you 2 things able keep information referenced abrecord arround:

  1. get abrecords id abrecordgetrecordid(). abrecordid defined int32_t can cast nsinteger , store wherever like. can later record abaddressbookgetpersonwithrecordid () or abaddressbookgetgroupwithrecordid(). aware, record changed or deleted user or app meanwhile.

  2. copy values inside record standard nsobject subclass , use nscoding or other techniques store it. of cause not benefit changes or additions record user have made.

of cause can combine both approaches.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -