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:
get abrecords id
abrecordgetrecordid(). abrecordid defined int32_t can cast nsinteger , store wherever like. can later recordabaddressbookgetpersonwithrecordid ()orabaddressbookgetgroupwithrecordid(). aware, record changed or deleted user or app meanwhile.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
Post a Comment