简体   繁体   中英

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. I wonder, does Apple allow launching application in applicationWillTerminate function?

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

applicationWillTerminate: tells you that you app needs to be killed by the system. Since this won't happen just for fun, Apple won't allow you to restart the app automatically ;-)

Apart from that, I think there is no (public) function at all, that allows you to launch an app programmatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM