Xcode 14: [Assert] UINavigationBar decoded as unlocked for UINavigationController

In Xcode 14 RC, I'm seeing this in the Console:

[Assert] UINavigationBar decoded as unlocked for UINavigationController, or navigationBar delegate set up incorrectly. Inconsistent configuration may cause problems. navigationController=<MasterNavigationController: 0x135016200>, navigationBar=<UINavigationBar: 0x134f0aec0; frame = (0 20; 0 50); opaque = NO; autoresize = W; layer = <CALayer: 0x600000380be0>> delegate=0x135016200

The above message displays exactly four times immediately at app launch (top of the console) then does not repeat.

MasterNavigationController is the internal class for the app's navigation controller. It is in a Storyboard, with very minimal ObjC code. I am not setting any specific size for the nav bar.

I don't remember seeing this in earlier builds of Xcode, but I can't swear to it that this is new. No assertion actually fires.

Post not yet marked as solved Up vote post of mitchcohen Down vote post of mitchcohen
27k views
  • I also find that promblem.

    **How I fix it. **

    If you use storyboards. Take the arrow(Attribute inspector-> is initial view controller) from Navigation View Controller in storyboard and put it in your next View Controller.

    Simplify change initial view controller in storyboard

  • TimMan, this fixes the logs, but disables the nav controller.

Add a Comment

Replies

Same! I only added NavigationBar, almost no code in the project, but this error displays.

[Assert] UINavigationBar decoded as unlocked for UINavigationController, or navigationBar delegate set up incorrectly. Inconsistent configuration may cause problems. navigationController=<UINavigationController: 0x109822e00>, navigationBar=<UINavigationBar: 0x108b2aef0; frame = (0 44; 0 50); opaque = NO; autoresize = W; layer = <CALayer: 0x280d5f2e0>> delegate=0x109822e00

Same issue we also facing... in OS 16 after splash screen showing black screen only.

After setting rootViewController call makeKeyAndVisible. This work for me.

self.window?.rootViewController = navigationVC self.window?.makeKeyAndVisible()

  • Where did you add that codes at? Scene Delegate or main view controller first showing ?

  • Scene Delegate

  • It works form me!! Thanks

Calling makeKeyAndVisible does nothing in my apps to silence this. There must be another reason for it.

Could it be apps where the interface files were created a long time ago?

same...I faced this error after ios 16 upgrade. Under iOS 15, It does not showing.

+1

Interface builder files were created a LONG time ago. Never had an issue with iOS 12, 13, 14, or 15.

This happens in a brand new project. I created a basic iOS app. In the storyboard, added a navigation bar controller, set that as the initial view controller, and set its root to the original view controller. Log is spammed once with that warning. Seems Apple needs to clean something up; especially if newly created projects will exhibit the same issue.

I just reported this.....iOS has so many alarmist system logs now devs have no way of controlling.

Also filed: "FB11508814" with attached minimal sample project.

  • I could not find it :(

  • Unfortunately I don't think you can view anyone else's feedback/bug reports except your own. Apple used to make filed bug reports available to all developers but stopped doing that for some reason. Seems kind of unproductive to me as no one can tell whether issues are being addressed or if you're about to file a duplicate report.

    I've had the same issue as OP (iOS16 only) but I haven't bothered to file a feedback since none of my other feedbacks have been answered.

Add a Comment

Interesting. Apple's system here is auto-generating a hyperlink for the Feedback identifier. Yet it is excluding the last digit in the link. Guess I'll file another bug. Putting the identifier in quotes was an experiement to see if the link would get fixed.

This is only an iOS 16 issue because when I run the app on my iPhone with iOS 15.6 these warnings don't show up.

  • Thank you, OlenaS. I will add that note to my bug report.

Add a Comment

Bug also exists in Xcode 14.1 Beta

Also in Xcode 14 final release.

Same...I faced this error after ios 16 upgrade, and only displays on iOS16 device. The error only displays if I create UINavigationController in storyboard. In my source, I create a UITabBarController with 4 tabs(UINavigationController) in storyboard, so the message displays 4 times. Then I changed to create UINavigationController in code, the error dose not showing.

  • Thanks a lot for the idea!! It works for me!!

Add a Comment

I just know using the storyboard. What is it like with code?