Playground App Could not cast value of type 'LLAppDelegateProxy' to 'SwiftUI.AppDelegate'

133 views Asked by At

Getting a crash with this error in my playground app. Not sure what's happening or how to fix this

Thread 1: signal SIGABRT

@main
    struct PlaygroundApp: App {
        @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate: AppDelegate
    
        var body: some Scene {
            WindowGroup {
                ContentView()
            }
        }
    }
    
    public class AppDelegate: NSObject, UIApplicationDelegate {
        static var orientationLock: UIInterfaceOrientationMask = .all
    
        public func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
            AppDelegate.orientationLock
        }
    }
0

There are 0 answers