CocoaHTTPServer
A small, lightweight, embeddable HTTP server for Mac OS X or iOS applications
CocoaHTTPServer is a library that lets Mac and iOS apps run their own mini web server from inside the app itself. Instead of communicating with an external server on the internet, the app hosts HTTP traffic locally. This is useful when you want your app to talk to a browser, expose files over a local network, or accept remote monitoring connections without depending on outside infrastructure.
The library is written in Objective-C and is designed to be small and easy to drop into an existing project. It supports both older IPv4 networks and modern IPv6 networks, and it handles multiple connections at the same time using a low-level Apple concurrency system called GCD, which keeps it fast and avoids blocking the app's main thread.
For security, CocoaHTTPServer includes optional password protection and SSL/TLS encryption, meaning connections can be locked down with credentials and transmitted over a secure channel. It also supports Bonjour, which is Apple's system for automatically announcing a service on a local network so other devices can discover it without needing to know an IP address in advance.
The library also includes WebDAV support. WebDAV is a protocol that lets remote clients treat a server like a file system, reading and writing files over HTTP. This makes it straightforward to build an app where, for example, a user connects from their computer to browse or pull files off their iPhone over the local Wi-Fi network.
The code is described as heavily commented and easy to extend, so developers can modify behavior without having to understand the entire codebase first. The project has a wiki and a mailing list for questions, and the README is short because the library's scope is narrow and focused.