I have some code which statically accesses [NSBundle mainBundle], but the documentation doesn’t make clear whether this can be accessed from a non-UI thread. I know all UI operations must be executed on the UI thread, but is the mainBundle classed as a UI element?
I have some code which statically accesses [NSBundle mainBundle] , but the documentation doesn’t
Share
The class prefix begins with NS* not UI* so no, the mainBundle isn’t part of the UI subsystem and you can access it from a background thread.
It’s worth remembering that the contents of the
mainBundleon iOS are immutable… so you are only really going to get useful info by reading frommainBundlenot writing.