@kienw notice how the tab bar usually displays the tab bar item image + title horizontally in a regular size class, but vertically when compact and it might be nice to adjust this too. This lead me to adjusting it all within the custom tab bar controller
class CustomTabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
if #available(iOS 18.0, *), UIDevice.current.userInterfaceIdiom == .pad {
traitOverrides.horizontalSizeClass = .compact
}
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
if #available(iOS 18.0, *), UIDevice.current.userInterfaceIdiom == .pad {
tabBar.traitOverrides.horizontalSizeClass = rootViewControllerHorizontalSizeClass
viewControllers?.forEach { viewController in
viewController.adjustSizeClass()
}
}
}
}
From my brief testing this has been fine and might be a backup solution while figuring out how to work with the new design.
Another option if the trait overrides feels too much like a hack. might be to do a custom tab bar controller and using a UITabBar directly. Alternatively hiding the default one as @DTS Engineer says and adding your own to manage.
Post
Replies
Boosts
Views
Activity
I just had the same thing coming here looking for an answer.
Eventually looked in the build logs and in the Extract app intents metadata (which had a green checkmark) I found this
Starting appintentsmetadataprocessor export
warning: At least one halting error produced during export. No AppIntents metadata have been exported and this target is not usable with AppIntents until errors are resolved.
warning: 'typeDisplayRepresentation' must directly instantiate a 'TypeDisplayRepresentation'
For me this was something like
static var typeDisplayRepresentation: TypeDisplayRepresentation {
TypeDisplayRepresentation(stringLiteral: "")
}
That used to work in some previous version of Xcode, updating it to
static var typeDisplayRepresentation: TypeDisplayRepresentation {
""
}
fixed it here, but might be good to check that log.
In my case I saw this after trying out Xcode 14b3 and switching back to Xcode 13.4.1 but not the active developer directory, xcode-select -s ~/Applications/Xcode.app did the job here.