1

We have few iOS users for whom app is crashing while updating user on Intercom. All are having iOS 10.3.2.

This is how we update user on Intercom after registration

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

_ = dispatch_after(1) {

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

}

below is the log we get on 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

Please help e find the issue.

Praful Kadam
  • 372
  • 6
  • 22

1 Answers1

0

crash was due to calling updateuser method of intercom on main thread. Putting all calls on background thread fixed the crash.

Praful Kadam
  • 372
  • 6
  • 22