How can I hide the Title Bar in the new SwiftUI App Protocol?
Since the AppDelegate.swift and SceneDelegate.swift protocols are gone, I cant follow this documentation anymore:
https://developer.apple.com/documentation/uikit/mac_catalyst/removing_the_title_bar_in_your_mac_app_built_with_mac_catalyst
I can't implement this code:
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
#if targetEnvironment(macCatalyst)
if let titlebar = windowScene.titlebar {
titlebar.titleVisibility = .hidden
titlebar.toolbar = nil
}
#endif
}
}
Hope it's still possible with the new AppProtocol..
Thank in advance
Post
Replies
Boosts
Views
Activity
I want to create a configurable widget with dynamic options. So I followed the Apple documentation and everything went fine until I needed to reach the .intentdefinition file.
This is a part of my widget code wich also shows the error.
I did add the .intentdefinition file to the correct targets as mentioned by Apple. For a dynamic widget, you also need to create a Intent Extension. Which I did. If you look to at the screenshot, you'll see that it can reach the .intentdefinition file and doesn't give any errors.
I tried to delete the .intentdefinition file and recreate it, but this didn't make a difference. I also made sure to build the project first when the .intentdefinition file was created.
On the screenshot below, you can see that I added the .intentdefinition file to the corresponding targets.
I hope someone can help me out on this.
Here is a post with the corresponding images.
https://stackoverflow.com/questions/64185405/intentdefinition-file-cant-be-found-by-a-swift-file-from-my-widget-extension