1

In ios11, Main Thread Checker warning occured at [FIRApp configure];

Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 4438, TID: 13441549, Thread name: (none), Queue name: FIRAnalyticsQueue, QoS: 9

Does anyone else get same warning? I wonder it's firebase's problem or just my code's.

KENdi
  • 7,576
  • 2
  • 16
  • 31

3 Answers3

2

Please update your Podfile with the string:

# Firebase
pod 'Firebase/Core', '~> 4.0.3'
Maxim Firsoff
  • 2,038
  • 22
  • 28
0

It was an issue later fixed by the Firebase team:

https://github.com/firebase/firebase-ios-sdk/issues/69

June 29

Thanks everyone for the feedback.

We just released Firebase 4.0.3 that fixes the main thread sanitizer issue.

Community
  • 1
  • 1
nathan
  • 9,329
  • 4
  • 37
  • 51
0

The reason why you see the runtime error is due to Apple adding Main Thread runtime checking to Xcode 9 and up. You are using Firebase SDK version which was released before the launch of iOS 11 beta 1, so, there is no runtime checking of UI updates. Since you have updated your Xcode, it enforces the check and gives you the warning at runtime. As nathan mentioned, Firebase team did a fix to the SDK by adding all the UI function calls in main thread.

So, whenever in your app, if you are making calls to UI related methods, make sure you are doing that from the main thread. Take a look at this answer to get a more detailed info on this new addition.

badhanganesh
  • 3,427
  • 3
  • 18
  • 39