IMO you should not implement FTP even though the customer wants it. FTP’s lack of security means that it’s not safe to use on the modern Internet. Is your customer happy with arbitrary folks being able to read their their plaintext user name and password off the ‘wire’? Because that’s an unavoidable aspect of FTP )-:
Regardless, you can run an FTP upload using the
CFFTPStream
API, as shown by the
SimpleFTPSample sample code. Three things to note:
CFFTPStream
has been formally deprecated, but it does continue to work about as well as it ever did.There is no official replacement for
CFFTPStream
. Apple’s position is that you should not be using FTP.The sample is in Objective-C, not Swift. It’s unlikely to be updated because of the previous two points.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"