The error happens in the completion handler of the task:
in APNSNetwork.swift -> sendPush
let task = self.session?.dataTaskWithRequest(request, completionHandler: { (data, response, err) -> Void in
let (statusCode, status) = APNServiceStatus.checkStatusCode((response as! NSHTTPURLResponse))
I got an error (err = Error Domain=NSURLErrorDomain Code=-1001 "The request timed out.") and response is nil
Force unwrap of response causes a fatal error.
The error happens in the completion handler of the task: in APNSNetwork.swift -> sendPush
I got an error (err = Error Domain=NSURLErrorDomain Code=-1001 "The request timed out.") and response is nil Force unwrap of response causes a fatal error.