Run a webserver on an iOS device
Solution 1
Take a look at Cocoa HTTP Server
Solution 2
According to the GitHub project:
CocoaHTTPServer is a small, lightweight, embeddable HTTP server for Mac OS X or iOS applications.
Sometimes developers need an embedded HTTP server in their app. Perhaps it's a server application with remote monitoring. Or perhaps it's a desktop application using HTTP for the communication backend. Or perhaps it's an iOS app providing over-the-air access to documents. Whatever your reason, CocoaHTTPServer can get the job done.
Besi
Updated on June 04, 2022Comments
-
Besi almost 2 years
I want to create an App that can share files between other iOS devices and potentially also Desktop computers.
So what I want to do is run a lightweight web server on my device that allows to download files from the device like so:
http://myphone.local:1234/folder/samplefile.txt
How can I provide such a server on a non-jailbroken device. I would prefer not to write a server like this from scratch :-).
Thanks a lot for your help
-
Besi over 12 yearsThanks for pointing this out one out. I guess I've stumbled upon it some while back. It definitely looks promising
-
Besi over 12 yearsSure I'll do this, bug I need to test it first.
-
Madhu almost 9 yearsDoes Apple Approve this cocoaHTTPServer, if i make use it in my App? Couple of days back my App is rejected by Apple for making use of RoutingHTTPServer.