简体   繁体   English

使用Wifi网络将iOS连接到一组iOS设备

[英]Connecting iOS a set of iOS devices with Wifi network

I'm searching a new way to sync data between iOS devices connected to the same Wi-fi network. 我正在寻找一种新方法来同步连接到同一Wi-fi网络的iOS设备之间的数据。

My app uses iCloud to sync its CoreData UIManagedDocument, but iCloud latency is too big for my goals. 我的应用程序使用iCloud同步其CoreData UIManagedDocument,但是iCloud延迟对于我的目标而言太大。

Is there some way to connect iOS devices in the same Wi-Fi network with the iOS SDK? 有什么方法可以将同一Wi-Fi网络中的iOS设备与iOS SDK连接起来? Any ideas? 有任何想法吗?

Thanks 谢谢

任何两个具有IP功能的设备都可以使用BSD套接字彼此连接-我已经编写了一个Objective-C包装程序来简化这样的网络操作- 就是这样。

You can use Gamekit to connect with both WiFi and Bluetooth and send data back and forth. 您可以使用Gamekit来连接WiFi和蓝牙并来回发送数据。

There's an excellent but lengthy tutorial here http://www.raywenderlich.com/12735/how-to-make-a-simple-playing-card-game-with-multiplayer-and-bluetooth-part-1 you should be able to pick out all the connectivity bits. 这里有一个很棒但冗长的教程http://www.raywenderlich.com/12735/how-to-make-a-simple-playing-card-game-with-multiplayer-and-bluetooth-part-1,您应该可以选择所有连接位。

From iOS 7, you should look into the Multipeer Connectivity Framework . 从iOS 7开始,您应该查看Multipeer Connectivity Framework It allows connections between iOS devices on the same Wi-Fi network or Bluetooth personal area network, and the API is extremely simple to use. 它允许在同一Wi-Fi网络或蓝牙个人局域网上的iOS设备之间进行连接,并且该API使用极其简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM