当应用程序崩溃时,“applicationWillTerminate”或“applicationDidEnterBackground”会被调用吗? [英] When an app crashes does either the 'applicationWillTerminate' or 'applicationDidEnterBackground' get called?

查看:1339
本文介绍了当应用程序崩溃时,“applicationWillTerminate”或“applicationDidEnterBackground”会被调用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当应用程序崩溃时,applicationWillTerminate或applicationDidEnterBackground会被调用,还是我希望得到太多?

When an app crashes does either the 'applicationWillTerminate' or 'applicationDidEnterBackground' get called or am I hoping for too much?

Apple的文档说明这[applicationWillTerminate]方法让你的应用程序知道它将被完全终止并从内存中清除。当应用程序崩溃时,它会终止并从内存中清除对吗?那么这是否意味着它被调用?

Apple's documentation states "This [applicationWillTerminate] method lets your application know that it is about to be terminated and purged from memory entirely". When an app crashes it gets "terminated and purged from memory" right? So does that mean it gets called?

这与iPhone和iOS有关,只是愚蠢的清楚。

This is all in relation to the iPhone and iOS just to be stupidly clear.

推荐答案

当应用程序崩溃时,它通常会立即被杀死。

When an app crashes, it usually gets killed immediately.

之后没有调用任何委托或方法或委托方法,因为被杀死的应用程序可能处于非常糟糕的状态,您可能想要写出的任何数据都可以被破坏且无法使用。

No delegates or methods or delegate methods get called after that, since the being-killed app is probably in a really bad state and whatever data you might want to write out could be corrupted and non-usable.

这篇关于当应用程序崩溃时,“applicationWillTerminate”或“applicationDidEnterBackground”会被调用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆