最佳答案
据我所知,某些应用程序可以在后台运行,并且可以在特定情况下重新启动。这是来自 Apple 文档
If you start this service and your application is subsequently terminated, the system automatically relaunches the application into the background if a new event arrives. In such a case, the options dictionary passed to the application:didFinishLaunchingWithOptions: method of your application delegate contains the key UIApplicationLaunchOptionsLocationKey to indicate that your application was launched because of a location event.
我的观点是:Skype 重新推出了远程通知机制。
更新
好吧,我想我找到了一些东西。 @Malek_Jundi 只对了一半。您的应用程序应该失败并返回非零退出代码,但它应该注册为 VoIP 应用程序。
Because VoIP applications need to stay running in order to receive incoming calls, the system automatically relaunches the application if it exits with a nonzero exit code. (This could happen in cases where there is memory pressure and your application is terminated as a result.) However, terminating the application also releases all of its sockets, including the one used to maintain the VoIP service connection. Therefore, when the application is launched, it always needs to create its sockets from scratch.
关于iphone - 如果应用程序意外关闭,如何重新启动应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10395142/