简体   繁体   English

如何将我的应用数据从一部 iPhone 发送到另一部

[英]How can I send my app data from one iPhone to another

I built an app which I can add images and texts, what I would like to do is to pack a data from this app (which I can do that by serializing an object to a file) and send it non-synchronically to another app in another IPhone and open it there (without using the mail nor the internet).我构建了一个可以添加图像和文本的应用程序,我想做的是从该应用程序打包数据(我可以通过将 object 序列化到文件来做到这一点)并将其非同步发送到另一个应用程序另一部 iPhone 并在那里打开它(不使用邮件或互联网)。

for example if I had MMS on IPhone I could do that by sending the file as MMS and set my app to open files with specific post-fix I choose.例如,如果我在 iPhone 上有彩信,我可以通过将文件作为彩信发送并将我的应用程序设置为使用我选择的特定后缀打开文件来做到这一点。

Please help, Thanks.请帮忙,谢谢。

you use an url scheme for small data, or the new UIDocumentInteractionController您对小数据使用 url 方案,或新的 UIDocumentInteractionController

What do you mean by "without using the internet"? “不使用互联网”是什么意思? You could use NSNetServices to establish connections between devices, and send whatever you want between them.您可以使用 NSNetServices 在设备之间建立连接,并在它们之间发送您想要的任何内容。 This relies on the TCP/IP protocol though, but does not use HTTP.这虽然依赖于 TCP/IP 协议,但不使用 HTTP。 So if you mean "without going via HTTP", this should be an alternative:因此,如果您的意思是“不通过 HTTP”,这应该是另一种选择:

http://developer.apple.com/library/ios/#documentation/Networking/Conceptual/NSNetServiceProgGuide/Articles/ResolvingServices.html#//apple_ref/doc/uid/20001078-SW1 http://developer.apple.com/library/ios/#documentation/Networking/Conceptual/NSNetServiceProgGuide/Articles/ResolvingServices.html#//apple_ref/doc/uid/20001078-SW1

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

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