Describe the bug
Calling Analytics.init() crashes my app with the following error:
Main Thread Checker: UI API called on a background thread: -[UIView init]
The line causing the crash is this in AppleUtils.swifts userAgent computed property:
return WKWebView().value(forKey: "userAgent") as? String
To Reproduce
Steps to reproduce the behavior:
- Call the initializer of
Analytics from a background thread (e.g. utility)
Expected behavior
Analytics is a task that I expect to work in the background.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform (please complete the following information):
- Library Version in use: 1.0.3
- Platform being tested: iOS 15
- Integrations in use: N/A
Additional context
N/A