Presenting a fullscreen viewController will cause crash in TabBarController when running iOS App in Mac(Designed by iPad)

Xcode Version 16.0 (16A242d)

[_NSFullScreenMenuBarCompanionController layoutTitlebarViews] last stack error :Thread 1: EXC_BAD_ACCESS (code=1, address=0x6b414b754e0) A bad access to memory terminated the process.

Presenting a fullscreen viewController will cause crash in TabBarController when running iOS App in Mac(Designed by iPad) A demo gonna recreate this crash. Demo is in attachment in Feedback issue (FB15183434). Or you can try yourself.

  1. Create a TabBarController
  2. Try to present a view controller as fullscreen mode.
  3. Crash will be occurred.
#warning(": Bug is here when presenting a fullscreen view controller from a tab bar managed view controller,")
let vc = UIViewController()
vc.modalPresentationStyle = .fullScreen
present(vc, animated: true)

Same issue !

Worked around the issue by using overFullScreen. But it's a hack.

Presenting a fullscreen viewController will cause crash in TabBarController when running iOS App in Mac(Designed by iPad)
 
 
Q