- XcodeでUIKitのアプリを作成する。
- Main.storyboardを削除する。
- ProjectファイルのTarget -> General -> Deployment Info -> Main Interfaceを空欄にする。
- Info.plist -> Application Scene Manifest -> Scene Configuration -> Application Session Role -> Storyboard Nameという項目を削除
- SceneDelegate.swiftの
guard let _ = (scene as? UIWindowScene) else { return }
を下記コードに変更:
guard let windowScene = (scene as? UIWindowScene) else { return }
let window = UIWindow(windowScene: windowScene)
window.rootViewController = ViewController()
window.makeKeyAndVisible()
self.window = window