Learning iOS Development
Connecting iOS AppDelegate, SceneDelegate, and ViewController
Avoid Non Programming Interfaces in the Project
Published in
4 min readMay 18, 2022
When we create a Story iOS App Project, we will get a few files automatically generated as below.
Only 3 Swift classes i.e. AppDelegate
, SceneDelegate
and ViewController
. There are 2 Storyboards and one info.plist
, the accessories that help connect them up.
From the diagram, we can see the Swift codes are not tied to one another. This makes it harder to control them programmatically.
Therefore, here I’m sharing how to programmatically hook them up.
1. Hook up AppDelegate with SceneDelegate
When we see the info.plist
, we can see it is used to connect to both the SceneDelegate
and also the Main
storyboard.