Skip navigation.
 
mlRe: base64 NSData to NSString
FROM : Michael Ash
DATE : Sat Mar 22 20:11:07 2008

On Sat, Mar 22, 2008 at 1:22 PM, Marco Cassinerio
<marco.<email_removed>> 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

Related mailsAuthorDate
mlbase64 NSData to NSString Marco Cassinerio Mar 22, 18:22
mlRe: base64 NSData to NSString Paolo Manna Mar 22, 19:12
mlRe: base64 NSData to NSString Jeff LaMarche Mar 22, 19:18
mlRe: base64 NSData to NSString Michael Ash Mar 22, 20:11
mlRe: base64 NSData to NSString Marco Cassinerio Mar 22, 20:40
mlRe: base64 NSData to NSString Jens Alfke Mar 22, 20:46
mlRe: base64 NSData to NSString Marco Cassinerio Mar 22, 21:19
mlRe: base64 NSData to NSString Jens Alfke Mar 22, 21:24
mlRe: base64 NSData to NSString Marco Cassinerio Mar 22, 22:11