I have a service in Windows that returns a PDF data, which it's in the database in a varbinary field. This service returns the PDF data as a Byte Array in JSON format
How can I read this data and convert it to PDF again, in my app in Xcode?
Which is the correct structure data to retrieve this byte array? NSArray? NSMutableArray?
I want to store this data, and I'm using a NSData structure...
Thanks
Asked
Active
Viewed 1,319 times
0

user1600801
- 269
- 7
- 25
-
You don't do this in Xcode. You do it in your iOS app. – rmaddy Apr 19 '13 at 00:59
-
Ok. In my App using Xcode – user1600801 Apr 19 '13 at 01:14
-
Ok. Thank you. I thougt my point was clear. It'a obvious I'm developing in objective-c using Xcode as ide. But the next time i'll be more specific – user1600801 Apr 19 '13 at 02:33
1 Answers
0
An NSArray
would be for arrays of objects, you want an array of bytes, which an NSData
is.
To get the data out of JSON, you would use the NSJSONSerialization
class to extract the data from your JSON object -- the deserializer will probably return your literal data as an NSString
, which you then would convert into an NSData
by decoding it.
Presumably your raw data is in the JSON as Base64 or some such.