gpt4 book ai didi

iphone - 如果应用程式意外关闭,应如何重新启动

转载 作者:行者123 更新时间:2023-12-03 16:15:30 26 4
gpt4 key购买 nike

Skype update text包含下一个:

App auto restarts if unexpectedly shut down



如何通过SDK执行该操作?

最佳答案

据我所知,某些类型的应用程序可以在后台运行,并可以在特定情况下重新启动。这是从苹果文档

https://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/doc/uid/TP40007125

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.



http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW12

关于iphone - 如果应用程式意外关闭,应如何重新启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10408199/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com