howto: binary data in http responses (base64?)

Discussion in 'iOS Programming' started by drivefast, Nov 6, 2008.

  1. drivefast macrumors regular

    Mar 13, 2008
    hi folks, i was wondering what do you usually use when you need to download binary stuff from an http server, together with some other data. for example when you make a request and expect to receive a few images in a response, and each image tagged with a caption and a date, for example. i was thinking of an xml response from the server, with the contents of the binary (image) file in a CDATA field, and base64-encoded. where can i find, and how can i use, a base64 decoder in cocoa? or, generally speaking, is there a better alternative than this. thanks.
  2. jnic macrumors 6502a

    Oct 24, 2008
    AFAIK there are no built-in base64 methods in Cocoa, but there are plenty of public domain C implementations that would be straightforward to port (Objective-C is a strict superset of C).

Share This Page