iOS crash report “unexpected start state” exception?
The above crash happens when you try initializing a NSAttibutedString with html content from any other thread than the main thread. So the solution here is to make sure the above NSAttributedString initialization is always called from the main thread. DispatchQueue.main.async { let options: [NSAttributedString.DocumentReadingOptionKey: Any] = [.documentType: NSAttributedString.DocumentType.html] let htmlString = try? NSAttributedString(data: htmlData, … Read more