通过 wifi 传输数据,无需数据库

发布于 2024-12-26 12:06:10 字数 92 浏览 2 评论 0原文

我想了解如何通过 Wi-Fi 在 2 部 iPhone 之间轻松传输数据。我想知道我是否可以在没有服务器或数据库的情况下但在应用程序内(因此不使用电子邮件)来做到这一点。

I want to get to know how I can transfer data easily between 2 iPhones, over wifi. I would like to know if I could do that without having a server or database, but within an app (so without using email).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深者入戏 2025-01-02 12:06:10

游戏套件支持 点对点连接,尽管名称如此,但它不仅可用于游戏:

GKSession 类允许您的应用程序创建和管理
ad-hoc蓝牙或本地无线网络,如图1所示。
在多个设备上运行的应用程序的副本可以发现
互相交换信息,提供简单而强大的
在 iOS 上创建多人游戏的方法。此外,会议还提供所有
应用程序提供了一种令人兴奋的机制,允许用户进行协作
彼此。

Game Kit has support for Peer-to-Peer-Connectivity and is, despite the name, not only usable for games:

The GKSession class allows your application to create and manage an
ad-hoc Bluetooth or local wireless network, as shown in Figure 1.
Copies of your application running on multiple devices can discover
each other and exchange information, providing a simple and powerful
way to create multiplayer games on iOS. Further, sessions offer all
applications an exciting mechanism to allow users to collaborate with
each other.

魄砕の薆 2025-01-02 12:06:10

您还可以查看 Apple 的 Bonjour API。我不确定你是否需要静态 IP 才能工作,或者它只能通过 wifi 工作。只是想给一个指点。

根据您的具体用例,它可以很好地工作。

看看这里,游戏中心也在那里。
http://developer.apple.com/technologies/ios/networking.html

You can also check out Bonjour API from Apple. I am not sure if you need a static IP for it to work or it can just work over wifi. Just trying to give a pointer.

Based on your exact usecase, it can work well.

Check it out here, Game center is also there.
http://developer.apple.com/technologies/ios/networking.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文