Open harpreetslabs opened 4 days ago
import UIKit
import Flutter
let flutterEngine = FlutterEngine(name: "SceneDelegateEngine")
@main
@objc class AppDelegate: FlutterAppDelegate, MessagingDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Start the FlutterEngine
flutterEngine.run()
// Attach the FlutterEngine to a FlutterViewController
let controller = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil)
window?.rootViewController = controller
window?.makeKeyAndVisible()
print("flutterEngine after")
// Register plugins with the FlutterEngine
GeneratedPluginRegistrant.register(with: flutterEngine)
// Call super to complete the launch process
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
@harpreetslabs check this if it works for u
Description
When launching the app with CarPlay, a blank screen appears for a few seconds before the app fully initializes. This issue occurs even when following the documentation and running the official example project. It gives the impression that the app is resuming from an old state.
Steps to Reproduce
Expected Behavior
The app should initialize immediately without showing a blank screen or old activity.
Actual Behavior
The app displays an old activity followed by a black screen for a few seconds before initializing.
Screenshots/Video
https://github.com/user-attachments/assets/32ebd4af-ca3c-43e2-b411-2725908c8331
Code Samples
SceneDelegate.swift (Copied from example)
AppDelegate.swift (Copied from example)
Environment
Package Version: 1.0.3 Flutter Version: 3.22.2 Minimum deployment version: 14.1 Device/Simulator: iOS simulator iPhone 14 pro