Swift implementation of QHTTPOperation

In the past I've used QHTTPOperation with great success.


If not a reimplementation, what I'm looking for is a Swift implementation of:

- fully async

- cancellable

- NSOperation subclass

- correctly handles the multitude of real wold networking hurdles


I rolled my our own in Obj-C last year at a previous company based on NSURLSession but cancelation was a persistent issue. Maybe we did something wrong, the details of our implementation escape me at this point...


It doesn't HAVE to be Swift, but it would be preferred. I say that because we also want something well tested.


Thanks in advance for any recommendations.

Replies

I’m most of the way through converting the LinkedImageFetcher sample code to Swift. Alas, that effort is stalled until I can get my DTS incident queue under control.

You should definitely take a look at WWDC 2015 Session 226 Advanced NSOperations. While I have some minor quibbles about Dave’s code—and those may be fixed by some of the third-party efforts to maintain and improve that code—the overall strategy is quite solid.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi eskimo


About a year later I'm very curious to see your code! Any update?


Best

Michael

About a year later I'm very curious to see your code! Any update?

No, alas )-:

Moreover, the code is halfway through an Objective-C to Swift 2 transition, so it’s not in a good state to share )-:

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"