Why doesn’t stopping an application in iOS simulator trigger applicationWillTerminate:?

前端 未结 2 1782
傲寒
傲寒 2021-01-11 09:24

I have some code in my AppDelegate’s applicationWillTerminate: method but I don’t know how to test if it works. Using Xcode to stop the simulator d

2条回答
  •  时光说笑
    2021-01-11 09:54

    In iOS 9.1 (perhaps before) this only seems to work if you double click home and drag the app up so it exits. Doing it from the desktop doesn't fire this event, it has to happen while the app is open in the simulator.

提交回复
热议问题