简体   繁体   English

当ApplicationWillTerminate时,Swift启动应用程序

[英]Swift launch app when applicationWillTerminate

I wanna launch my app when plugged-in on iOS devices but i don't find any solution how can i do it. 我想在iOS设备上插入时启动我的应用程序,但我找不到任何解决方案我该怎么办。 I wonder, does Apple allow launching application in applicationWillTerminate function? 我想知道,Apple是否允许在applicationWillTerminate函数中启动应用程序?

Thanks for your interest. 谢谢你的关注。

Regards. 问候。

This method lets your app know that it is about to be terminated and purged from memory entirely. 此方法可让您的应用知道它即将被终止并完全从内存中清除。

Source: API Reference 来源: API参考

applicationWillTerminate: tells you that you app needs to be killed by the system. applicationWillTerminate:告诉您应用程序需要被系统杀死。 Since this won't happen just for fun, Apple won't allow you to restart the app automatically ;-) 由于这不会只是为了好玩而发生,Apple不会允许您自动重启应用程序;-)

Apart from that, I think there is no (public) function at all, that allows you to launch an app programmatically. 除此之外,我认为根本没有(公共)功能,允许您以编程方式启动应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Swift:在applicationWillTerminate之后获取persistentStoreCoordinator时核心数据崩溃 - Swift : core data crashed when getting persistentStoreCoordinator after applicationWillTerminate 应用程序终止时的 Swift IOS 启动通知 - Swift IOS launch notification when app terminated applicationWillTerminate上的Swift后台任务 - Swift Background task on applicationWillTerminate 当应用程序崩溃时,“applicationWillTerminate”或“applicationDidEnterBackground”会被调用吗? - When an app crashes does either the 'applicationWillTerminate' or 'applicationDidEnterBackground' get called? 什么时候会调用 applicationWillTerminate? - When will applicationWillTerminate be called? 推出Swift应用程序序列 - Launch sequence of Swift app app delegate的applicationWillTerminate在用户杀死应用程序或关闭设备时未调用 - app delegate's applicationWillTerminate not called when user kills app or shuts down device 在应用程序之后打开应用程序从另一个应用程序打开时会终止于首选状态吗? - Opening app after applicationWillTerminate in a preferred state when opening from another app? Swift-在applicationWillTerminate中调用本地通知方法 - Swift - Calling Local Notification Method in applicationWillTerminate firebase auth / swift-无法在applicationWillTerminate上删除匿名用户? - firebase auth / swift - anonymous user not delete on applicationWillTerminate?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM