skip to Main Content

image description here] When I run it in the application simulator the build succeeds but the output is black. this type of error is faced. The problem is mentioned in this image url.

3

Answers


  1. Chosen as BEST ANSWER
            To add a code to the configurationforconnecting function in the app delegate file.
    

    Before add code in function

    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
        // Called when a new scene session is being created.
        // Use this method to select a configuration to create the new scene with.
    
    }
    

    add code in function

    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
        // Called when a new scene session is being created.
        // Use this method to select a configuration to create the new scene with.
        let config = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role)
        config.delegateClass = SceneDelegate.self
        config.storyboard = UIStoryboard(name: "Main", bundle: nil)
        return config
    }
    

  2. The error in the screenshot shows that the UIScene file is not properly set in your Info.plist file. Set it to the you UIScene file or remove the key if you are not using a UIScene

    Login or Signup to reply.
  3. If you are using storyboard your info.plist should have the key like in the image and your storyboard should be named as in the key Storyboard Name which is in this case called Main and in your SceneDelegate file the function scene(_:willconnect:) should be like in the second imageimage1

    Image2

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search