简体   繁体   English

IOS设备之间的Objective-C异步通信

[英]Objective-C Async communication between IOS devices

Is there a way to perform async communication between iPhones/IOS devices? 有没有办法在iPhone / IOS设备之间执行异步通信? I have been researching and thought maybe APN might fill that void, but it sounds like I can't initiate an APN push from an IOS dvice to another, and even if I could I can't trigger the "event" on the other device with just an APN push from what I can identify. 我一直在研究,认为APN可能填补了这一空白,但这听起来像无法启动从IOS装置到另一个装置的APN推送,即使我无法触发另一个装置上的“事件”凭我所能识别的APN推送。

Does anyone have any examples or general advice for IOS device interaction for devices that are not in GameKit (ie wifi/bluetooth) range that does not require an intermediate service (urban airship, dedicated server, etc) or will I need to have a 3rd party in order to trigger and/or sync these interactions between devices? 对于不在GameKit(例如wifi /蓝牙)范围内且不需要中间服务(城市飞艇,专用服务器等)的设备,是否有人对IOS设备交互有任何示例或一般建议,或者我需要拥有第三为了触发和/或同步设备之间的这些交互?

Sorry I don't have any code or details as this is still in the planning phases for me. 抱歉,我没有任何代码或详细信息,因为这仍在我的计划阶段。 Any pointers would be greatly appreciated. 任何指针将不胜感激。

The answer is : use a server side app and have all your devices talk to that server. 答案是:使用服务器端应用程序,并使所有设备与该服务器通信。

If you dont want or cannot host an app, you can use a cloud solution based on websocket like Pusher . 如果您不希望或无法托管应用程序,则可以使用基于Websocket的云解决方案,例如Pusher You can then subscribe to events and post messages with data. 然后,您可以订阅事件并发布带有数据的消息。

They have an iOS client library 他们有一个iOS客户端库

http://pusher.com/docs/client_libraries http://pusher.com/docs/client_libraries

PS: Also have a look at Parse and Stackmob , i remember that had this kind of feature was in their roadmap, but i don't know if it's available yet.. PS:还可以看一下ParseStackmob ,我记得他们的路线图中已经包含了这种功能,但是我不知道它是否可用。

Hope this helps, Vincent 希望对您有帮助,文森特

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

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