【问题标题】:Intercom : iOS App crashing on updating user only on iOS 10.3.2对讲:iOS App 仅在 iOS 10.3.2 上更新用户时崩溃
【发布时间】:2017-07-04 13:11:54
【问题描述】:

我们很少有 iOS 用户在对讲机上更新用户时出现应用程序崩溃的情况。所有人都在使用 iOS 10.3.2。

这是我们在注册后在对讲机上更新用户的方式

registerIntercomUser(userNo: self.gbl.getUserNo())

_ = dispatch_after(1) {

updateIntercomUser(userObj: userObj!, userNo:self.gbl.getUserNo())

}

下面是我们在 crashlytics 上得到的日志

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

请帮助找到问题。

【问题讨论】:

    标签: ios swift intercom-ios


    【解决方案1】:

    崩溃是由于在主线程上调用对讲的updateuser方法。将所有调用放在后台线程上修复了崩溃。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-02-04
      • 2013-10-02
      • 1970-01-01
      • 2020-08-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多