Use of undelcared type 'URLDataPromise'

71 Views Asked by At

Currently updating an app from Swift 2 to Swift 4.2 I am running into an error concerning URLDataPromise

extension NSURLConnection {
    public class func GET(URL: String, query: [NSObject:Any]? = nil) -> URLDataPromise {
        return go(try OMGHTTPURLRQ.GET(URL, query))
    }

}

The error in question is "Use of undeclared type 'URLDataPromise' The rest of the app imports PromiseKit 6 just fine.

1

There are 1 best solutions below

0
On

You posted code from the NSURLConnection+promise.swift

This code has since been depreciated.

26 days ago, there was an update to that document.

However, my findings were inconclusive as to whether they'll support Swift 4.2.

Best of luck!