Questions tagged [gcdwebserver]

Lightweight GCD based HTTP server for OS X & iOS (includes web based uploader & WebDAV server)

GCDWebServer is a modern and lightweight GCD based HTTP 1.1 server designed to be embedded in OS X & iOS apps.

See https://github.com/swisspol/GCDWebServer for details.

104 questions
1
vote
1 answer

WKWebView not executing any js code

I am rendering a local index.html file inside my Xcode project, using WKWebView. The thing is, the html and css code inside the file are successfully displayed inside the webView, but the javaScript however, is not rendered at all. I have searched…
Hudi Ilfeld
  • 1,905
  • 2
  • 16
  • 25
1
vote
0 answers

Extend gcdwebserver to Support HTTPS

I'm looking for an embeddable IOS web server that supports HTTPS. Has anyone attempted to extend gcdwebserver to support SSL? Or has anyone got specific advice on how to go about it?
John MacLean
  • 293
  • 2
  • 5
1
vote
2 answers

Get the Bonjour URL from GCDWebServer

I am using GCDWebServer and starting it by running: webServer!.start(withPort: 8080, bonjourName: "Test") When checking the [INFO] logs from GCDWebServer, I can see two messages in two distinct spots: GCDWebServer started on port 8080 and…
Tomáš Hübelbauer
  • 9,179
  • 14
  • 63
  • 125
1
vote
2 answers

iOS app sandbox for accepting connections on TCP sockets

I'm making use of the library GCDWebServer(https://github.com/swisspol/GCDWebServer) in a project of mine, that requires me to accept connections originating only from my application's process, for security reasons. I was hoping this is something…
HungryTux
  • 355
  • 3
  • 14
1
vote
1 answer

Prohibit downloading Dependencies of CocoaPod

When I link a CocoaPod in a Podfile that includes further Cocopods via dependencies: How can I disable the installation of these dependencies (via the Podfile)? Background scenario: GCDWebserver includes optional logging with CocoaLumberjack.…
jn-se
  • 238
  • 2
  • 9
1
vote
2 answers

How to serve a single page application in a Swift iOS app?

I have a Swift project with a webview that is serving files from a local folder vai GCDwebserver, however the website is designed as a single page application, is there any way I can rewrite all url requests to index.html? I'm currently using…
Bill
  • 4,614
  • 13
  • 77
  • 132
1
vote
1 answer

How to read the body of a POST request with GCDWebServer in Swift

I'm trying to use GCDWebServer to read/write to a file in the documents directory. Reading the file seems fairly straight-forward and I've pretty much got that how I need. I want to write to the file using a POST request. So I tried adding a handler…
Drew Perry
  • 11
  • 3
1
vote
2 answers

GCDWebServer response with completionBlock called from another block

I'm using GCDWebServer to share pictures from my iPhone to others devices on local network. I'm trying to call the GCDWebServerCompletionBlock inside my own block but my app crashes without any logs but "signal SIGABRT" on…
tezqa
  • 139
  • 8
1
vote
1 answer

Nsurlrequest [get/post] to gcdwebserver urlQuery null

I am working on gcdwebserver,i am sending post request to gcdwebserver,sending some params also,but in addhandlermatchblock not getting query params,please reply code: NSString * postString=@"name=ram&age=20"; NSURLSession * session =…
skyshine
  • 2,767
  • 7
  • 44
  • 84
1
vote
1 answer

GCDWebServerFileResponse fails with ErrorCode=-1017 "cannot parse response"

I am trying to send a file from one device to another using GCDWebServerFileResponse but I am getting following error everytime: Optional(Error Domain=NSURLErrorDomain Code=-1017 "cannot parse response" UserInfo={NSUnderlyingError=0x14e6d46a0 {Error…
Vik Singh
  • 1,563
  • 2
  • 19
  • 36
1
vote
2 answers

Why is my XWebView served index.html using the file scheme and how do I change it?

I'm using a WKWebView to serve the index.html of a single page web app (ember) like this: class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let webview = WKWebView( frame:…
Robert Carter Mills
  • 793
  • 1
  • 9
  • 19
1
vote
1 answer

iOS re-routing requests w/ GCDWebServer (not redirecting)

I want to create a server on iOS with GCDWebServer, which will accept request to localhost, and then, draw the data from another url (a video file) and stream the data to the response. I intend to use plain NSURLConnection, and in the didReceiveData…
csotiriou
  • 5,653
  • 5
  • 36
  • 45
1
vote
1 answer

GCDWebServer 500 error

I try to run GCDWebServer in order to access it from the same device on which it is going to work. I have following code import UIKit import Foundation import WebKit class ViewController: UIViewController, WKNavigationDelegate { var webServer:…
Alexey K
  • 6,537
  • 18
  • 60
  • 118
1
vote
2 answers

GCDWebServer(iOS). how can I request 2 different path with same port? (such as 8080)

when use GCDWebServer(iOS), I want to request 2 urls like: 192.168.0.121/sample, 192.168.0.121/sample2 with same port like 8080. But one success, one failed.I know port been occupied, but how to aviod it? this is my demo, thx for…
user4728148
1
vote
1 answer

Override MimeType for GCDWebserver

I am implementing a simple static webserver using GCDWebserver, problem is my jpeg file names do not have a file extension. This is confusing my clients I see there is a kGCDWebServerDefaultMimeType in GCDWebServerPrivate.h #define…
Ryan Heitner
  • 13,119
  • 6
  • 77
  • 119