• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: base64 NSData to NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >base64 NSData to NSString (From: Marco Cassinerio <email@hidden>)

  • Prev by Date: Re: Best Way To Lookup From a Huge Table
  • Next by Date: Help with this code
  • Previous by thread: Re: base64 NSData to NSString
  • Next by thread: Re: base64 NSData to NSString
  • Index(es):
    • Date
    • Thread