objective c - Passing NSData Multiplayer GAme -


i want pass array 1 player player:

this how create it:

nsdata *packet = [nsdata datawithbytes:&_spielescreenshots length:sizeof(_spielescreenshots)]; 

nsdata. _spielescreenshots array.

how can array in didreceivedata method? possible?

(void)match:(gkmatch *)match didreceivedata:(nsdata *)data fromplayer:(nsstring *)playerid {} 

i use create data:

nsdata* data = [nskeyedarchiver archiveddatawithrootobject: self.spielescreenshots];

and in didrecievedata method: nsmutablearray *array = [nskeyedunarchiver unarchiveobjectwithdata:data];

now error:

* terminating app due uncaught exception 'nsinvalidargumentexception', reason: '* -[nskeyedunarchiver initforreadingwithdata:]:


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Apache Thrift Tutorial Error -