Possible Duplicate:
How to send an NSDictionary (or plist file) as NSData using GameKit bluetooth?
I’m looking for a simple way to send a PLIST file, or an NSDictionary through bluetooth from one device running my app to another.
How do I convert a PLIST file to NSData (which can then be sent through bluetooth) and then convert it back later?
(I’d appreciate if someone can get me started with some code.)
Please see the answer found
here: https://stackoverflow.com/questions/4107004/how-to-send-an-nsdictionary-or-plist-file-as-nsdata-using-gamekit-bluetooth
You can use the following to transform Plist to NSData:
And this to transform NSData to Plist:
of
NSPropertyListSerializationclassformatcould beNSPropertyListBinaryFormat_v1_0to use lowest byte count