我们很少有iOS用户在更新Intercom用户时崩溃了。所有人都有iOS 10.3.2。
这是我们在注册后更新内部通信用户的方式
registerIntercomUser(userNo: self.gbl.getUserNo())
_ = dispatch_after(1) {
updateIntercomUser(userObj: userObj!, userNo:self.gbl.getUserNo())
}
下面是我们在崩解剂上的日志
Crashed: com.apple.main-thread
0 Evolution 0x100061b84 specialized updateIntercomUser(userObj : User, userNo : Int) -> () (IntercomLogger.swift:1543)
1 Evolution 0x1000d97e4 partial apply for ViewController.(checkLogin() -> ()).(closure #1) (ViewController.swift)
2 Evolution 0x100148b28 partial apply for (dispatch_after(Double, queue : DispatchQueue, closure : () -> ()) -> () -> ()?).(closure #2) (Util.swift)
3 libdispatch.dylib 0x190fce9a0 _dispatch_client_callout + 16
4 libdispatch.dylib 0x190fdb604 _dispatch_continuation_pop + 448
5 libdispatch.dylib 0x190fe7c1c _dispatch_source_latch_and_call + 204
6 libdispatch.dylib 0x190fd08a0 _dispatch_source_invoke + 804
7 libdispatch.dylib 0x190fd34a0 _dispatch_main_queue_callback_4CF + 668
8 CoreFoundation 0x1920c50c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
9 CoreFoundation 0x1920c2ce4 __CFRunLoopRun + 1572
10 CoreFoundation 0x191ff2da4 CFRunLoopRunSpecific + 424
11 GraphicsServices 0x193a5c074 GSEventRunModal + 100
12 UIKit 0x1982ad058 UIApplicationMain + 208
13 Evolution 0x10005ea28 main (IntercomLogger.swift:17)
14 libdyld.dylib 0x19100159c start + 4
请帮助我找到问题。
答案 0 :(得分:0)
崩溃是由于在主线程上调用对讲机的updateuser方法。将所有调用放在后台线程上修复了崩溃。