Re: Address Book, Rendezvous, and NSCoding
Re: Address Book, Rendezvous, and NSCoding
- Subject: Re: Address Book, Rendezvous, and NSCoding
- From: Vince DeMarco <email@hidden>
- Date: Thu, 18 Sep 2003 13:52:15 -0700
On Sep 18, 2003, at 12:05 PM, Greg Anderson wrote:
I'm trying to write an app to shove ABAddressBook information through
Rendezvous. My major hurdle is the fact that it looks like none of the
AB classes conform to NSCoding, so I can't use an NSArchiver to
convert the info to NSData to send out. The closest I've gotten is
using -people to get the NSArray of ABPerson objects, then putting its
-description into an NSString and archiving that. Unfortunately,
converting the other way doesn't work, because the received NSString's
-propertyList method fails, complaining about a malformed plist format
and whatnot.
Has anyone else attempted this and done it (easily)? I see a few apps
out there that talk about being able to share your AB entries via
Rendezvous, but w/out source it's hard to learn much from them. I'm
not sure if they just send a subset of data, or have worked out a way
to send all the info. I've gotten around similar situations (where a
data type doesn't conform to NSCoding) by just deconstructing it into
data types that do conform to NSCoding, and using that. But since that
looks like a pretty weighty proposition for NSPerson objects, I'd
prefer an easier solution.
Any info or ideas would be greatly appreciated.
Write out the cards as vCards, and then reconstruct the ABPerson from
the vCard on the other end.
vince
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.