Requesting visual style in an implementation that has disabled it

I'm running iOS17 App and getting this message in the Xcode 15 console. Five times every time I goto one of the pages in my NavigationStack.

Google's search engine has never heard of this.

"Requesting visual style in an implementation that has disabled it, returning nil. Behavior of caller is undefined."

Anyone got a clue of what I've disabled - without being aware of it. And what code is going to pick up a butcher knife and stab me at 3:47am - very undefined behavior!

Is it just me or is this message missing some important detail?

Thanks David.

I'm getting exactly the same. Did you manage to figure it out?

Unless you are seeing a visual issue this is just a log due to internal implementation details, not something that you've caused. If this does manifest as an actual issue we would appreciate a bug report, but otherwise you can just ignore it.

I had the same message in the console. In my case, I was configuring the navigationBar to prefer large titles. I was doing this in my main ViewController, but when I moved that logic to the application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool method of my AppDelegate, the message in the console disappeared.

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: 
        [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        UINavigationBar.appearance().prefersLargeTitles = true
        return true
    }

By configuring prefersLargeTitles in the AppDelegate, you are setting this preference before any view controllers are created and initialized. This can help avoid conflicts or unexpected behaviors that may arise when changing the navigation bar settings after view controllers are already in use or presented on the screen.

Also, keep in mind that prefersLargeTitles was introduced in iOS 11, so earlier versions will show an error.

Requesting visual style in an implementation that has disabled it
 
 
Q