xcode 如何使用 WiFi 以编程方式将 iphone 连接到另一部 iphone 或 ipad?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5742839/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:52:15  来源:igfitidea点击:

How can i connect a iphone to another iphone or ipad programically using WiFi?

iphoneobjective-cxcodecommunicationwifi

提问by Christina

I am a newbie in iphone development and obj-c.How can i connect a iphone to another iphone or ipad programically using WiFi connection?can i able to transfer files between one iphone to another iphone or ipad using WiFi?I would really appreciate if someone could assist me in the correct way to do this, and if possible any sample code to get my started. Thank You In Advance..

我是 iphone 开发和 obj-c 的新手。如何使用 WiFi 连接以编程方式将 iphone 连接到另一部 iphone 或 ipad?我可以使用 WiFi 在一部 iphone 到另一部 iphone 或 ipad 之间传输文件吗?我真的很感激有人可以以正确的方式帮助我做到这一点,如果可能的话,还有任何示例代码可以帮助我开始。先感谢您..

采纳答案by Inder Kumar Rathore

Yes you can transfer data between two devices using wifi. Use CFNetwork framework. either you use bonjour service or an I.P. address to transfer data.. here is the guide for CFNeworks

是的,您可以使用 wifi 在两个设备之间传输数据。使用 CFNetwork 框架。您使用 bonjour 服务或 IP 地址来传输数据.. 这里是CFNeworks的指南

回答by Alex Terente

You can use bonjour. Tutorial here

您可以使用卓悦。教程在这里

Getting Started with Networking & Internet

网络和 Internet 入门