Archived Forum Post

Index of archived forum posts


Using CkoFtp2Progress in Swift

Nov 16 '14 at 07:27

I am Bridging the Objective-C Library to Swift. Works fine, but I cannot Override the BeginDownloadFile Method, because of type missmatch with the second Parameter. Does anybody know, what will be the right declaration in Swift? I tries all types I know, including UnsafeMutablePoint and UnsafePointer combinations. Help would be great !!!!! Below the code, which works, but not the BeginDownloadFile Method. This gives an error of overriding incompatible declaration.

Best, Stefan

class SyncProgress : CkoFtp2Progress {

 override func BeginDownloadFile( path: NSString, skip: CLong) {
    println ("BeginDownloadFile: \(path)")

override func EndDownloadFile( path: String,  numBytes: NSNumber) {
    println ("EndDownloadFile: \(path)")

override func DownloadRate(var byteCount: NSNumber, var bytesPerSec: NSNumber) {
    println ("DownloadRate: \(byteCount)")



I use the old style Objective-C Implementation just for the CkoFtp2Progress and the rest in Swift. This works now perfect for me.