Search code examples
iosobjective-ccocoahttpserver

Objective-C/CocoaHTTPServer - Is it possible to run CocoaHTTPServer as a background app without any UI?


I want to run CocoaHTTPServer as an independent background app which doesn't have any screens. Other apps in the device should be able to communicate with this app for remote server connectivity. Is it technically possible in iOS ? Any suggestions are greatly appreciated.


Solution

  • No. It is not possible. CocoaHTTPServer is a small, lightweight, embeddable HTTP server for Mac OS X or iOS applications. It can't be run as a standalone application. It has to be added as a part of an application. The server is running only while application is in foreground. As soon as you exit from the application (by switching to another app or locking a device) the server will be stopped. The server will be restarted when you enter the application again