1

Found these articles, but can't figure out how they help:

Understanding crash report (Partial apply...) in Swift Swift closure crashes when called as Objective-C block

I am getting Partial Apply Forwarder in the below code:

    let task = session.dataTask(with: request, completionHandler: {
        (data, response, error) in

        if error == nil {
            let result = String(data: data!, encoding: String.Encoding.utf8)!
            if WebService.THETA_INVALID == result {
                failure(LoginService.INVALID_MESSAGE)
            }
            else if WebService.THETA_UNVALIDATED == result {
                failure(LoginService.UNVALIDATED_MESSAGE)
            }
            else {
                let loginCredentials = LoginCredentials()
                loginCredentials.username = user
                loginCredentials.password = password
                loginCredentials.authorization = result
                success()
            }
        } else {
            failure(error!.localizedDescription)
        }

    })
    task.resume()

The error object.failure contains "Partial Apply Forwarder" and I have no idea what this means. I've tried googling and it appears to have something to do with optionals, but most things have something to do with Thunk?

Can anyone help point me to the issue?

Thom
  • 14,013
  • 25
  • 105
  • 185

1 Answers1

1

After much digging and banging on it, I noticed something in the right xcode pane:

nsurlsession nsurlconnection http load failed kcfstreamerrordomainssl -9802

I googled this and found this question:

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813) in iOS 9 with Xcode 7.1

So I created a dictionary in my info.plist called App Transport Security Settings and then added a key called Allow Arbitrary Loads. I set it to boolean true and re-ran my test and everything is working.

Yikes!

Thom
  • 14,013
  • 25
  • 105
  • 185