I'll just post this into the ether while I spend the rest of my day trying to figure it out. Maybe someone out there has some insight?
On iOS 26.3.1 (not any major OS prior) if I add a UITableView to the UIWindow of a UIWindowScene of a UIScreen which is an external screen (😮‍💨) UIKit crashes with a fatal error about a missing user idiom.. Woot. No crash if I add a plain UIView. iOS 26 bug? What to do?
#UIKit #Xcode #iOSDev
@2ndNatureDev yep your app delegate isn't returning the correct external display type of screen configuration, you're returning 'windowedApplication' instead of what it requests
@stroughtonsmith Damn, same crash when returning the correct configuration. Before you answered, I came across a Stack Overflow answer that said “don't use UITableViews” and I remember you saying “friends don't let friends use UITableView” 😂 My app is pretty much built on UITableViews, so ouch. Tried adding a UICollectionView - and that doesn't crash.. 😐
@2ndNatureDev I would say audit everything; a table view should be fine, you have a scene mismatch, maybe in the info plist?
@2ndNatureDev override traitCollection and add the missing trait if super.traitCollection doesn't have it. (This will most likely produce a warning at runtime that overriding it is not supported, you can ignore that)
@Cyberbeni Thank you so much for suggesting this - it was the solution!