Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Using force unwrap is not right, there is a reason why these properties are marked as optional by Apple. In the past, I have faced that UIApplication.shared.delegate as! AppDelegate is crashing the app.
    – Egzon P.
    Commented Aug 4, 2022 at 12:32
  • Its giving me AppSceneDelegate. But in my case, it is 'SceneDelegate'. So i m unable to cast AppSceneDelegate into SceneDelegate Commented Jan 24 at 15:39