I am getting the below warning and the app shows a black screen for iOS 13
[SceneConfiguration]
Info.plist
configuration "(no name)" for UIWindowSceneSessionRoleApplication contained UISceneDelegateClassName key, but could not load class with name MyApp.SceneDelegate.
How can I resolve this issue?
SceneDelegate
has supported after iOS 13. If you want to use SceneDelegate
and also want to support iOS prior to iOS 13 then you have to do some changes in your project.
Execute SceneDelegate
if iOS 13 available.
@available(iOS 13.0, *)
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
//Other code
}
@available(iOS 13.0, *)
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
}
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
}
AppDelegate needs a UIWindow property. iOS 13 uses SceneDelegate in new projects. Specify the
UIWindow
object and remove theSceneDelegate.swift
file.If you have removed the
SceneDelegate
from the project, then you must remove the Application Scene Manifest dictionary from Info.plist.