如何从后台iOS打开应用程序

如何从后台iOS打开应用程序

本文介绍了如何从后台iOS打开应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在iOS中将后台应用打开到前台?

Is it possible to open the background app into foreground in iOS ?.

我有一个类似的情况,如果假设我的应用程序在后台,那么一段时间后,我需要以编程方式将应用程序设置为前台.有可能吗?

I have a scenario like, If suppose my application in background then after sometime I need to up the application into foreground programmatically.Is it possible ?

我不需要在Appstore中上传应用程序.

I don't need to upload the application in Appstore.

推荐答案

在iOS设备中,如果没有用户操作,您将无法启动应用程序,因为它受Apple的限制,现在,您可以使用backgroundfetch在后台打开您的应用程序,以进行某些网络通话或所需的操作,但是它最多只能持续不到一分钟,持续30秒,在此期间,您的网络请求应已完成,并且所有长时间任务都已排定,即使在后台执行效果时,您也可以通过在MAIN线程上发布通知来更新UI.

you can not launch your app without user action in your ios device because it is restricted by Apple,Now you can use backgroundfetch to open your app in background to do some network call or stuff you want but it is limited to less than a minute mabe upto 30Sec lasts, during that time your network request shoould be completed and all long duration task is scheduled, even during background fect you can update your UI by posting notification on MAIN thread.

这篇关于如何从后台iOS打开应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 02:51