大佬教程收集整理的这篇文章主要介绍了swift – 部分申请thunk Crash.,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是崩溃日志:
Crashed: com.apple.main-thread 0 Rekindlr 0x10007a728 ViewController.(user_info(Match?,completionHandler : (Bool?) -> ()) -> ()).(closure #1) (ViewController.swift:201) 1 Alamofire 0x100156678 partial apply for thunk (Responseserialization.swift) 2 Alamofire 0x10015891c specialized request.(response<A where ...> (queue : OS_dispatch_queue?,responseserializer : A,completionHandler : (Response<A.serializedObject,A.ErrorObject>) -> ()) -> Self).(closure #1).(closure #1) (Responseserialization.swift:131) 3 libdispatch.dylib 0x1827614bc _dispatch_call_block_and_release + 24 4 libdispatch.dylib 0x18276147c _dispatch_client_callout + 16 5 libdispatch.dylib 0x182766b84 _dispatch_main_queue_callBACk_4CF + 1844 6 CoreFoundation 0x182cccdd8 __CFRUNLOOP_IS_serviCING_THE_MAIN_DISPATCH_QUEUE__ + 12 7 CoreFoundation 0x182ccac40 __CFRunLoopRun + 1628 8 CoreFoundation 0x182bf4d10 CFRunLoopRunSpecific + 384 9 Graphicsservices 0x1844dc088 GSEventRunModal + 180 10 UIKit 0x187ec9f70 UIApplicationMain + 204 11 Rekindlr 0x10007d4e4 main (AppDelegate.swift:17) 12 libdispatch.dylib 0x1827928b8 (Missing)
以及相关来源:
typealias CompletionHandler = (success: Bool) -> Void func user_info(match:(Match?),completionHandler:CompletionHandler) { var Tind_id = match!.Tinder_id var user_url = "\(user_iNFO_URL)\(Tind_id)" Alamofire.request(.GET,user_url,headers: ["X-Auth-Token": Tinder_token],encoding: .JSON) .responseJSON { response in let json = JSON(response.result.value!) var result = json["results"] var distance = result["distance_mi"].intValue let realm = try! Realm() try! realm.write { match?.distance_km = round(Double(distancE) / 0.62137) } completionHandler(success: truE) } }
我猜我在使用COR_761_11845@pletionHandler时遇到了什么问题?但它不会发生在每个人身上.我无法重现崩溃,但我的一些用户正在获取它.
以上是大佬教程为你收集整理的swift – 部分申请thunk Crash.全部内容,希望文章能够帮你解决swift – 部分申请thunk Crash.所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。