Reputation: 83
I have usual Scenedelegate willConnectTo method as pretty common. My question is when I put a breakpoint to inside of this and close the app slide up ( kill the app ) and reopen it doesn`t come to this breakpoint or print anything
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
var coordinator: Coordinator?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
print(">>>>>>>>>>>>>>Not printing<<<<<<<<<<<<<<")
}
}
I am sure I am missing some concept and there is nice explanation by more experienced developers than me. Thanks
Upvotes: 0
Views: 500
Reputation: 535925
This has nothing to do with your code, willConnect
, or anything else. You're not reopening the app from within Xcode (Run), you're just clicking the app icon in the simulator / device. So you're not debugging. So no breakpoints and no printing to the console, because those are Xcode features, and you're not running the app from Xcode.
There is a way to hook the Xcode debugger in when you launch by clicking the icon, but you're not doing that.
Upvotes: 1