views:

50

answers:

2

Any one knows how to write and read NSMutableArray or Dictionary data using AsycSocket Library ?

Clarification: I want a way to archive NSMuatbleArray and write this on the stream. seemed pretty forward but running in simulator I get this wierd error [NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive

A: 

That depends upon what is running on the server side. You can convert an array or dictionary to XML or JSON and send either of those over a socket connection. For that matter, though, you could just skip AsyncSocket and use a standard NSURLConnection to POST any data to a web server that is running some server side script capable of parsing the data you send it.

Your question is very broad. If you're more specific you'll probably get a better answer.

Matt Long
hmmmm JSON XML is too much for this small iPhone app.
A: 

Are you passing the complete archive, or only what you've read so far? You can't unarchive objects from an archive you haven't fully read in yet.

Peter Hosey