Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i convert a NSData to NSArray? [duplicate]

Possible Duplicates:
How to convert NSArray to NSData?
Need to convert NSData to NSArray

HI, I have a NSData object named as "myNsData"(it is converted form of NSArray) and a NSarray named as "myNsArray. can any one provide me a code to convert a NSData to NSArray?

like image 613
Vipin Avatar asked May 24 '11 10:05

Vipin


2 Answers

See this post... Convert NSArray to NSData

The last comment deals with the reverse....

NSArray *array = [NSKeyedUnarchiver unarchiveObjectWithData:data]
like image 75
Simon Lee Avatar answered Sep 20 '22 19:09

Simon Lee


I am not sure but can you try

   NSArray *myNsArray = [NSKeyedUnarchiver unarchiveObjectWithData:myNsData];
like image 24
visakh7 Avatar answered Sep 20 '22 19:09

visakh7