iPhone : Transfer of files from Mac/Pc to app

放肆的年华 提交于 2019-11-27 21:27:32

问题


I need to transfer binary files from my pc/mac to my app. I want to allow my users to upload sound files. Am i going to have to run a web server that the user can connect to over wifi?

What are the steps i have to go through to get this up and running?


回答1:


In my apps, I use the open-source cocoahttdserver. It is quite trivial to setup in your app and connect to from a computer using the same network. They have an iPhone sample project that you can pretty much cut and paste from for basic functionality.




回答2:


Do you need to transfer the files program-atically or through a GUI? If you can use a GUI, enable file sharing, and use iTunes>IPod>Apps>File sharing to drag and drop / load files to and from your application's Documents folder.

If you need to do it programatically, here is a technical note describing different strategies to do so: http://developer.apple.com/library/ios/#technotes/tn2152/_index.html



来源:https://stackoverflow.com/questions/2242419/iphone-transfer-of-files-from-mac-pc-to-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!