Re: base64 NSData to NSString
Re: base64 NSData to NSString
- Subject: Re: base64 NSData to NSString
- From: "Michael Ash" <email@hidden>
- Date: Sat, 22 Mar 2008 15:11:07 -0400
On Sat, Mar 22, 2008 at 1:22 PM, Marco Cassinerio
<email@hidden> wrote:
> Hi,
>
> i'm trying to read the com.apple.recentitems.plist file and i found
> that "Alias" and "Icon" key are base64 NSData object.
> NSData and NSString don't provide methods to manage base64 data.
They aren't "base64 NSData objects", they are NSData objects which
happen to be stored using base64. This is an implementation detail and
you shouldn't need to care about it.
The .plist extension implies that these are property lists. You can
read them with NSPropertyListSerialization. This will take care of
decoding the NSData objects however they are represented, and will
also do nice things like not fail utterly when Apple decides that this
plist should be stored using the binary format instead of the XML
format.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden