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 send two reponses to a GCDWebServer request

I'm using GCDWebServer's addDefaultHandlerForMethod:@"GET" and sending an NSData response via GCDWebServerDataResponse responseWithData:contentType:@"application/octet-stream" The user's browser receives a file which it saves in the Download…
Jeff
  • 2,659
  • 1
  • 22
  • 41
0
votes
3 answers

How to read body of a POST request with GCDWebServerRequest

I have the following handler to respond to POST request: [_webServer addHandlerForMethod:@"POST" path:@"/" requestClass:[GCDWebServerURLEncodedFormRequest class] …
Huiting
  • 1,368
  • 7
  • 24
0
votes
2 answers

Disable moving items in GCDWebUploader

I'm trying to implement GCDWebUploader in my iOS app. I want to disable 'Move Items' and 'Create Folder' options. How can I do that?
Mohit
  • 45
  • 2
  • 10
0
votes
1 answer

Xcode - dyld: Library not loaded

I trying to use GCDWebServer installed with cocoapods in my Cocoa Application and it's works fine! But when I try to do the same in Command Line Tool Application I get this error - dyld: Library not loaded:…
Ihor Skliar
  • 384
  • 2
  • 16
0
votes
1 answer

How to stream audio(Device Songs) using cocoahttpserver in swift?

I'm creating application that one device act as server and other devices join, I manage to create server, but I can't find a way to stream audio (Device local songs). Steps: i create server with GCDWebServer get NSData from MPMediaItem set songData…
user7956625
0
votes
1 answer

GCDWebServer returns HTTPRequest status zero with no responseText

I have the following javascript app that receives data from GCDWebServer that runs on an OSX app. var HttpClient = function() { this.get = function(aUrl, aCallback) { var anHttpRequest = new XMLHttpRequest(); …
Z. Zepos
  • 87
  • 1
  • 7
0
votes
2 answers

How to connect to local database from local server in iOS

I have following scenario I have Sqlite file of 4GB of data to support offline. Can I copy to the app and distribute the app, does it affect application performance. I need to read data from the same sqlite file, can I use the native sqlite…
kanna
  • 63
  • 8
0
votes
1 answer

How I can compare two iOS local web-servers?

I created an iOS app prototype that runs two web servers (CocoaHTTPServer and GCDWebServer). And I want to choose the best one. I need to use a local web-server as a backend for JS-application (Will God Forgive Me?) that will shown in WKWebView in…
Sergei Belous
  • 4,708
  • 1
  • 16
  • 20
0
votes
2 answers

GCDWebserver listening for HTTP POSTs

I need my Swift 2.1 app to listen for HTTP POSTs arriving on my public endpoint by another service. Not sure how to initialise GCDWebserver. let webServer = GCDWebServer() I tried: webServer.addHandlerForMethod("POST", path:…
ppp
  • 713
  • 1
  • 8
  • 23
0
votes
1 answer

How to limit connections to allowed IP's in GCDWebServer

I'm playing with GCDWebServer class (it is great!) and was wondering if it is possible to limit allowed connections by remote IP. server.addDefaultHandlerForMethod("GET", requestClass: GCDWebServerRequest.self, processBlock: {request in let…
Lukasz 'Severiaan' Grela
  • 6,078
  • 7
  • 43
  • 79
0
votes
1 answer

How to stop an instance of GCDWebUploader - Objective-c iOS

In my app I have successfully started an instance of GCDWebUploader and I can upload files into my App's documents directory. What I would like is to give the users the ability to stop the web sever whenever a button is pressed. I've tried to set…
Synny
  • 542
  • 1
  • 4
  • 18
0
votes
1 answer

How to get GCDWebServerBodyReaderCompletionBlock synchronously?

I'm working on a proxy-kind thing, which should make a request via NSURLSession and progressively transfer it to the GCDWebServer response. The issue is with GCDWebServerStreamedResponse responseWithContentType:asyncStreamBlock – it requires a…
norlin
  • 1,205
  • 11
  • 24
0
votes
0 answers

Xcode 8 Segmentation Failure with Swift Class using GCDWebServer

After upgrading to Xcode 8 I get a segmentation 11 error in the following class: class WebServer: GCDWebServer { static let sharedInstance = WebServer() var webServer = GCDWebServer()! override init() { …
C6Silver
  • 3,127
  • 2
  • 21
  • 49
0
votes
0 answers

GCDWebUploader.bundle causes code singing error (macOS)

When I try to submit a macOS app that has GCDWebServers 3.3.3 added via Carthage: github "swisspol/GCDWebServer" == 3.3.3 I get the following error: Invalid Signature. Code object is not signed at all. The binary at path…
Aral Balkan
  • 5,981
  • 3
  • 21
  • 24
0
votes
1 answer

GCDWebServerFileResponse, knowing when file is no longer being used

I'm using GCDWebServer in a sandboxed MacOS desktop application. I make a file available to a client using the GCDWebServerFileResponse, which works well. However, some of the file resources are accessed via a Security Scoped Bookmark (because of…
user5896182