简体   繁体   English

如何将应用程序从后台带到前台

[英]How to bring app from background to foreground

How to hit method after some delay of time ( it's Min, hour, day ).如何在延迟一段时间(分钟、小时、天)后点击方法。 And bring app from background to foreground even app is locked or another app is running.即使应用程序被锁定或另一个应用程序正在运行,也可以将应用程序从后台带到前台。 For eg Incoming call.例如来电。 Please help me to how implement请帮助我如何实施

You cannot programmatically bring an app to foreground on iOS.您不能以编程方式将应用程序置于 iOS 上的前台。 All you can do is schedule a User Notification for a specific time and hope the user sees it (hasn't disabled your notifications) and taps it to bring your app to foreground.您所能做的就是在特定时间安排用户通知,并希望用户看到它(没有禁用您的通知)并点击它以将您的应用程序带到前台。

See the Apple documentation and read some tutorials;查看 Apple 文档并阅读一些教程; that topic is way too complex for a single answer here.这个话题太复杂了,无法在这里给出一个答案。

You mention an "incoming call".您提到了“来电”。 So you might also want to look into CallKit which may provide what you need.因此,您可能还想研究可能提供您需要的CallKit

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

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