终止应用程序后如何运行Swift代码 [英] How to run swift code after terminate app

查看:119
本文介绍了终止应用程序后如何运行Swift代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户从后台终止我的应用程序时,是否可以无限/长时间运行ios应用程序代码?请帮助我.

Is there a way to run ios application code unlimited/ long time while the user terminate my app from background? Please help me.

我进行了很多搜索,但没有找到合适的解决方案.

I have searched a lot but did not find any proper solution.

推荐答案

不可能.

您可以在后台运行一堆服务,例如Location Services BUT,即使您需要配置应用程序并获得END USER的同意才能继续监视他/她的位置.即使用户同意,他也有很多选择,例如在使用应用程序时监视我的位置,或者始终或永远不会.

There are a bunch of services that you can run in the background such as Location Services BUT even for that you need to configure your app and have the CONSENT of the END USER to continue to monitor his/her location. Even if the user consents, he has a bunch of options like monitor my location while using the app or always or never.

所有这些选项都是用户可以在iOS设备的设置"部分中更改的选项.

All these options are something that user can change in the "Settings" section of the iOS device.

即使您在未经最终用户同意的情况下尝试运行您的应用程序或任何服务背景,Apple也会绝对拒绝您的应用程序.

Even if you try to run your app or any of the services background without the consent of the End user, Apple will definitely reject your app.

希望这会有所帮助.

这篇关于终止应用程序后如何运行Swift代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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