3 Replies
      Latest reply: Oct 18, 2016 12:33 AM by eskimo RSS
      Opiyum Level 1 Level 1 (0 points)

        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.

        • Re: Swift implementation of QHTTPOperation
          eskimo Apple Staff Apple Staff (6,665 points)

          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"