Game Kit Bluetooth sending NSData
Hi
I am trying to develop a multiplayer game which uses the gameKit framework in OS 3.0. However I have come across some problems. Mainly sending data between devices.
I can connect two devices using the picker - that is fairly easy, however I am unsure about the whole NSData object thing I am supposed to be sending between the devices.
I want to send several vars such as NSInteger, NSString, CGPoint and CGFloats. I thought a good way to do this would be to tie these up in an array and send that, but how do I turn that into NSData and then reassemble that at the other end?
Or is there a better way?
Any light you can shed on the matter would be greatly appreciated.
Thanks
Jetwilson
|