Ok so i am trying to send an array of objects over bluetooth.
I have successfuly created the session and all the methods get called at the right time.
and in my recieve data method:
but i try to loop through the newArray object to see what is in it but its count is 0. why is it not successfully sending the array object over bluetooth?
I have successfuly created the session and all the methods get called at the right time.
Code:
NSData *data = [NSKeyedArchiver archivedDataWithRootObject: array];
[session sendDataToAllPeers:data withDataMode:GKSendDataReliable error:nil];
and in my recieve data method:
Code:
NSArray *newArray = [NSKeyedUnarchiver unarchiveObjectWithData:data];