How to make iOS application act as web server

2019-04-11 21:14发布

问题:

I have developed an iPhone application which will have some files (images, audio & video) in applications document directory (Note: File are in documents directory & not resources or main bundle).

I want to create a unique URL which will allow user to download these files(from apps document directory) from browser on other devices as Mac, smartphones, etc.

So may be in short make iOS application act as web server allowing to download application's files.

How to achieve this?

回答1:

Try CocoaHTTPServer - you can use that to serve up a page with download links to files in the documents directory. (and to serve up the files themselves)