I think you're getting the warning because the UIWindow "rootViewController" property is settable, and the setter must run on the main thread. The getter would seem to be safe, since it (presumably) doesn't mutate anything, but there is a potential race condition if the getter and setter happen to run simultaneously in different threads.
In many apps, the main window's rootViewController never changes, so this race condition can't occur. In that case, I suggest you add a readonly property such as "mainViewController" to your app delegate, which you initialize to "window.rootViewController" during your app's startup. That should silence the warning, and (since it never changes) can't be subject to a race condition.
If you do change your rootViewController during execution, you're going to have to arrange some kind of thread safety guarantee. You could use a dispatched block as Claude suggested, but I'd use "sync" rather than "async". Just be careful you don't use it anywhere that might cause a deadlock.