What I need is to create NSAttributedString objects from relatively big HTML strings and store them (NSAttributedString-s) in the database. And of course I woul
Yes you can't it in a background thread only on main thread.
Use Oliver Drobnik's NSAttributedString+HTML class.
Code would be something like this -
NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithHTML: dataUsingEncoding:NSUTF8StringEncoding] documentAttributes:nil];
Link - https://github.com/InfiniteLoopDK/NSAttributedString-Additions-for-HTML/blob/master/Classes/NSAttributedString%2BHTML.m