Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App shows blank Screen when opens #2

Open
sharadAimonk opened this issue Oct 10, 2022 · 2 comments
Open

App shows blank Screen when opens #2

sharadAimonk opened this issue Oct 10, 2022 · 2 comments

Comments

@sharadAimonk
Copy link

sharadAimonk commented Oct 10, 2022

Hey, I have tried to run this app but I was getting some path issues, so I created a sample app and sample module and copy code from here to dedicated files. But when I run the app it just shows blank screen.
How I copied the code:

  • Copy main.dart file to my flutter module
  • copy appdeligate.swift file code
  • copy viewcontroller code
  • add entitlement file as well
    Still it just shows blank white screen, is there anything I am missing ?
    Softwares Versions :
  • Xcode 13.4.1
  • Iphone 11 simulator
@jeffmilanes
Copy link

jeffmilanes commented Oct 11, 2022

Hello @sharadAimonk ,

I've encountered this issue as well, i fixed this by adding the SceneDelegate.swift, have you add the swift file directly to vscode? if so, we should add the swift files directly to xcode.

SceneDelegate.swift

@available(iOS 13.0, *)
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 }

        window = UIWindow(windowScene: windowScene)

        let flutterEngine = FlutterEngine(name: "SceneDelegateEngine")
        flutterEngine.run()
        GeneratedPluginRegistrant.register(with: flutterEngine)
        let controller = FlutterViewController.init(engine: flutterEngine, nibName: nil, bundle: nil)
        window?.rootViewController = controller
        window?.makeKeyAndVisible()
    }
}

@fotiDim
Copy link
Collaborator

fotiDim commented Feb 27, 2023

@sharadAimonk can give some details about the path issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants