I have crash log from my application. I don't understand this problem:
0 Test Application 0x000e0ccc Test_Application.firstVC.(firstFunc (Test_Application.firstVC) -> () -> ()).(closure #1) (firstVC.swift:110)
1 Test Application 0x000d7f10 partial apply forwarder for Test_Application.firstVC.(firstFunc (Test_Application.firstVC) -> () -> ()).(closure #1) (firstVC.swift:0)
2 Test Application 0x000d7f7c partial apply forwarder for reabstraction thunk helper from @callee_owned (@owned ObjectiveC.NSData!, @owned ObjectiveC.NSURLResponse!, @owned ObjectiveC.NSError!) -> (@unowned ()) to @callee_owned (@in (ObjectiveC.NSData!, ObjectiveC.NSURLResponse!, ObjectiveC.NSError!)) -> (@out ()) (firstVC.swift:0)
3 Test Application 0x000d7ffc partial apply forwarder for reabstraction thunk helper from @callee_owned (@in (ObjectiveC.NSData!, ObjectiveC.NSURLResponse!, ObjectiveC.NSError!)) -> (@out ()) to @callee_owned (@owned ObjectiveC.NSData!, @owned ObjectiveC.NSURLResponse!, @owned ObjectiveC.NSError!) -> (@unowned ()) (firstVC.swift:0)
Around 110 line I have:
let request = NSMutableURLRequest(URL:NSURL(string: "http://localhost.com/")!)
let session = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration())
var bodyData = "test=true"
request.HTTPMethod = "POST"
request.HTTPBody = bodyData.dataUsingEncoding(NSUTF8StringEncoding)
var postData = session.dataTaskWithRequest(request, completionHandler: {(data : NSData!, response : NSURLResponse!, error : NSError!) in
var jsonDict: AnyObject! = NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.MutableContainers, error: nil)
})
Especially strange this thing because when I trying debug application from XCode it's works! But when I try use Ad Hoc deployment (diawi.com or TestFlight.com) I get this error.