我们可以在手机开机时以编程方式在ios中重启应用程序 [英] Can we restart an app programmatically in ios when the phone is turned on

查看:726
本文介绍了我们可以在手机开机时以编程方式在ios中重启应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个在后台运行的应用程序,每15分钟调用一次URL,但是当手机关闭并打开时,我们想要自动打开应用程序并继续调用URL,这可能吗? ?

We have an app that runs in the background, which calls an URL every 15 minutes, but when the phone is turned off and turned on, we want to open the app automatically and resume calling the URL, is this possible???

这是一个应用程序,它向用户提供本地通知,表示网站内容已更改,当管理员更改了内容时,这就是原因。 ..

This is an app that gives a local notification to the user that a website content has changed, when the content has been changed by the admin, that is the reason...

我认为这对于位置服务和voip是可行的,但在我们这样做之前有什么条件以及如何做到这一点?

i think this is possible for location services and voip, but what are the conditions before we do this and how to do this?

非常感谢任何帮助,在此先感谢...

any help will be much appreciated, thanks in advance...

推荐答案

有一种方法通过设置应用程序的 UIBackgroundMode 来包含 voip 值来为voip应用程序执行此操作。请参阅 Apple文档,但这里有关于voip标志为你做什么的摘录:

There is a way to do this intended for voip apps by setting your app's UIBackgroundMode to include the voip value. See the Apple Documentation on that for more info, but here is the excerpt about what the voip flag does for you:


该应用程序提供IP语音服务。使用此密钥的应用程序是系统启动后自动启动的
,以便应用程序可以重新建立VoIP服务
。使用此密钥的应用也可以播放
背景音频。

The app provides Voice-over-IP services. Apps with this key are automatically launched after system boot so that the app can reestablish VoIP services. Apps with this key are also allowed to play background audio.

如果您的应用是voip应用,那么这是你需要什么。如果你的应用程序不是一个voip应用程序,我不知道这个更改是否会超过Apple的评论,因为该标志实际上是针对voip应用程序。

If your app is a voip app, then this is what you need. If your app is not a voip app I don't know if this change will make it past Apple's review since that flag is really meant for voip apps.

这篇关于我们可以在手机开机时以编程方式在ios中重启应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆