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
0
votes
1 answer

How to set GCDWebServerOption_AutomaticallySuspendInBackground to NO

I am new to iOS and swift with some experience in android. I am using the GCDWebUploader. Its working fine. The server suspends when the app is in background. I am aware of the constraints in iOS Background Execution. I dont want to change that…
lvin
  • 290
  • 3
  • 11
0
votes
1 answer

Accessing mutable data from a GCDWebServer request handler

I'm getting occasional crashes in my GCDWebServer handlers, which access mutable dictionaries. The GCDWebServer ReadMe says the handlers "are executed on arbitrary threads within GCD so special attention must be paid to thread-safety and…
arlomedia
  • 8,534
  • 5
  • 60
  • 108
0
votes
1 answer

GCDWebServer always aborts on options check

I started using GCDWebServer version 3.1 in an app last year, and this line in the addHandlerWithMatchBlock method of GCDWebServer.m always caused the system to abort immediately: GWS_DCHECK(_options == nil); I ended up just changing it to this to…
arlomedia
  • 8,534
  • 5
  • 60
  • 108
0
votes
1 answer

Customising GCDWebserver's GCDWebServerFunctions file

How can I customise GCDWebServerFunctions's GCDWebServerGetPrimaryIPAddress method without changing the file itself? I want it to look for addresses using ppp0 interface if none can be found for en0 for devices using VPN. Can't seem to be able to…
Andy
  • 21
  • 1
0
votes
1 answer

How to send multipart response of jpegs

Having an embedded HTTP Server in an iOS application, How can I respond to an HTTP Request with a multipart message? I'd like to asynchronously send JPEGs in a multipart response (MJPEG). I've tried doing so using GCDWebServer, if it's not…
Alon Amir
  • 4,913
  • 9
  • 47
  • 86
0
votes
1 answer

Playing received NSData from an HTTP POST request using AVAudioPlayer

Here is the code where the POST handler for the local web server is implemented. It downloads the song in the form of NSData( (request as! GCDWebServerURLEncodedFormRequest).data ) at the server which is uploaded from the client device. …
ANUVIND
  • 73
  • 4
0
votes
1 answer

Need help implementing GCDWebServer with GCDWebServerDataRequest

In the past I've used GCDWebServer to handle GET request passing query parameters. I now need to set it up to handle POST requests passing JSON objects. I could not find direct examples or descriptions of how this may be done with GCDWebServer, but…
ikaz
  • 81
  • 1
  • 5
0
votes
1 answer

GCDWebServer fails to comile when CocoaLumberjak is included in project

When using cocoapods, with those 2 libs: pod "GCDWebServer", "3.3.2" pod 'CocoaLumberjack', '2.2.0' Project fails to compile, as GCDW does not link to LumberJack (even optionally). Adding Lumberjack to "Linked Grameworks and Libraries" as…
Atomicus
  • 691
  • 1
  • 5
  • 6
0
votes
4 answers

Updating UI as the result of a request handler

I have a setup like this; startup() { ... self.gcdWebServer.addHandlerForMethod("GET", path: "/hide", requestClass: GCDWebServerRequest.self, asyncProcessBlock: {request in self.hide()}) ... } func hide() ->…
Stafford Williams
  • 9,696
  • 8
  • 50
  • 101
0
votes
1 answer

Reuse the same port for GCDWebServer upon foregrounding?

When the app is suspended, is the server connection technically closed? When the user foregrounds the app again and the port has been set as 0, how likely is it that it will start with a different port? Just wondering what sort of cases to handle…
meisel
  • 2,151
  • 2
  • 21
  • 38
0
votes
0 answers

GCWebServer on tvOS appears to stop responding to requests

I've got GCDWebServer up and running, bridged to Swift. What I am observing, via several tests, is that although the network connection hasn't changed, the web server hasn't stopped (not logged, dealloc breakpoints not hit, requests queue raised,…
0
votes
1 answer

clip to show how configure and use GCDwebserver

i want to conference about GCD Webserver to my classmates, but i dont know how to configure and use it, and i dont have mac laptop to test, so i need a good tutorial clip about this, searching a lot but could not find anything , every thing is just…
faezeh
  • 1
  • 2
0
votes
2 answers

GCDWebServer on tvOS

Anyone managed to use GCDWebServer on tvos? I've tried compiling in Xcode 7.1 and I get: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GCDWebServer", referenced from: objc-class-ref in AppDelegate.o …
Jonathan
  • 341
  • 3
  • 14
0
votes
1 answer

how to redirect GCDWebServer requests to an external host from within an iOS app

In my iOS app I'm trying to add a simple GCDWebServer redirect handler like so: self.webServer!.addHandlerForMethod("GET", pathRegex: "/api/.*", requestClass: GCDWebServerRequest.self, processBlock: { request in let url =…
Robert Carter Mills
  • 793
  • 1
  • 9
  • 19
0
votes
1 answer

Why video start buffing with offline server?

I am doing the functionality of downloading video and playing in offline mode. Here I am using NexPlayer with GCDWebServer my videos are encoded and needs to sync with server. I am using GCDWebServer for offline mode but after some video play its…
RJ168
  • 1,006
  • 2
  • 12
  • 22