iPhone:序列化和通过蓝牙发送对象? [英] iPhone: serialize and send objects over bluetooth?
本文介绍了iPhone:序列化和通过蓝牙发送对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是序列化一个对象,并把它通过蓝牙(或网络连接)的最好方法?
What is the best way to serialize an object and send it over a bluetooth (or network connection)?
推荐答案
您可以使用的GameKit 的API。
sendDataToAllPeers:withDataMode:错误:或
sendDataToAllPeers:withDataMode:error: or
送出数据:toPeers:withDataMode:错误:
sendData:toPeers:withDataMode:error:
数据可以是封装在NSData的任何格式
the data can be any format encapsulated in NSData.
这篇关于iPhone:序列化和通过蓝牙发送对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文