SwiftKickMobile / SwiftMessages

A very flexible message bar for UIKit and SwiftUI.
MIT License
7.3k stars 742 forks source link

[Testing]: Testing Breaks with 'UIView.init(coder:) must be used from main thread only' #397

Closed willnix86 closed 4 years ago

willnix86 commented 4 years ago

Although I can build my app just fine, when trying to run XCTests, it fails with the following error inside the BaseView.swift file:

'Thread 3: UIView.init(coder:) must be used from main thread only'

wtmoose commented 4 years ago

I feel like I’m stating the obvious, anything that invokes UIKit code needs to be done on the main queue. You should be able to look at the call stack to find out why you’re not on the main queue.

wtmoose commented 4 years ago

No response. Closing

willnix86 commented 4 years ago

Sorry @wtmoose - it was idiocy on my part, meant to follow up. Thank you!