3 Replies
      Latest reply: Sep 16, 2016 1:39 AM by eskimo RSS
      salva73 Level 1 Level 1 (0 points)

        Hi, I'm trying to figure out how to upgrade an app of mine for iOS 10 / Swift 3.0.

         

        With iOS 9.0 and Swift 2 I was using an open solution from GitHub to open a Tcp socket

        as a client, and read/write data on the Socket, and another separated solution to establish

        an FTP connection as a client to a server, and upload and download files.

         

        Now many parts are deprecated, and I cannot use anymore those two solutions.

         

        Do you have any suggestion to solve these two problems, and maybe any sample code as an

        example?

         

        Many thank, Salva

        • Re: Tcp Sockets and Ftp uploads/downloads with Swift 3 and iOS 10
          eskimo Apple Staff Apple Staff (7,530 points)

          What specific APIs are you using?  You seem to have two issues here, one related to TCP connection and another related to FTP.  Is that right?  Or is this all about FTP?

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

            • Re: Tcp Sockets and Ftp uploads/downloads with Swift 3 and iOS 10
              salva73 Level 1 Level 1 (0 points)

              For FTP I was using Rebekka ftp (https://github.com/Constantine-Fry/rebekka) and I'm looking for a similar solution.

               

              Thanks,

               

              Salva

                • Re: Tcp Sockets and Ftp uploads/downloads with Swift 3 and iOS 10
                  eskimo Apple Staff Apple Staff (7,530 points)

                  According to the read me that uses CFFTPStream.  CFFTPStream was deprecated in the iOS 9 SDK for a couple of reasons:

                  • We strongly recommend that folks not use FTP at all.  FTP offers no security and thus is not appropriate for the modern Internet.

                  • The one place where FTP might be reasonable to use today is for anonymous FTP downloads (assuming you have some way to check the validity of the download after you’ve got it), and for that you can use NSURLSession.

                  • The previous two points mean we’re not actively working on CFFTPStream.  It continues to limp along but does not get any enhancements.

                  If you really care about FTP you should use a third-party FTP library (one that’s not based on CFFTPStream).  However, it would be much better to put your efforts into moving away from FTP.

                  Share and Enjoy

                  Quinn “The Eskimo!”
                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                  let myEmail = "eskimo" + "1" + "@apple.com"