目标C-终止在后台运行的所有其他应用 [英] Objective C - Terminate all other apps running in the background

查看:95
本文介绍了目标C-终止在后台运行的所有其他应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要开发一个企业应用程序,该应用程序应该能够在未越狱 iOS设备上通过多线程关闭当前正在运行的所有其他应用程序.

I need to develop an enterprise application, which should be able to close all other Apps which are currently running via multithreading on non-jailbreaked iOS-devices.

几年前,我有一个名为 PKiller或Process Killer ,它列出了所有当前正在运行的应用程序,包括其程序ID,并能够将其关闭.它是在官方AppStore上发布的一个应用程序,但由于违反其指导方针,Apple当然将其删除.

Some years ago I had an App called PKiller or Process Killer, which listed all currently running applications including their program ID and was able to close them. It was an App published in the official AppStore but of course Apple took it down, due to the violation of their guidelines.

有人知道如何获取当前正在运行的进程并将其关闭吗?

Does anybody know how to get currently running processes and shut them down?

(同样,由于该应用程序是企业应用程序,因此该应用程序将不会转到Apple/AppStore)

(again this App will not go to Apple / the AppStore, due to the fact, that it's an enterprise Application)

我进行了更深入的研究,发现在iOS 9中,您甚至无法获得任何正在运行或已安装的Apps以及PID之类的已连接信息.其他方法以获取iOS 9中的任何第三个PID失败.

I did deeper researches and found out, that you can't even get any running or installed Apps and the connected information like the PID anymore in iOS 9. Apple made the sysctl no longer accessible to sandboxed iOS 9 apps. Also other methods in order to get any third PID failed in iOS 9.

推荐答案

过去曾经有一种方法,但是从iOS 9开始,它将不再起作用.用于沙箱的iOS 9应用程序无法再访问用于此目的的库sysctl.

There was a way to do it in the past, but as of iOS 9, it will no longer work. The library that was used for this, sysctl is no longer accessible to sandboxed iOS 9 apps.

在iOS 9中,沙盒现在可以阻止进程访问 其他的kern.proc,kern.procargs和kern.procargs2值 流程

In iOS 9, the sandbox now prevents a process from accessing the kern.proc, kern.procargs, and kern.procargs2 values for other processes

不允许iOS应用查看其他正在运行的应用

iOS apps are not permitted to see what other apps are running

https://developer.apple.com/videos/play/wwdc2015-703 /

也许还有另一种方式,但是它肯定不会像几年前那样容易,而且即使没有企业的大力支持,苹果公司也将寻求关闭.

There may be another way, but it certainly will not be as easy as it was a couple of years ago, and not without major effort that Apple will be looking to shut down, even for enterprise apps.

这篇关于目标C-终止在后台运行的所有其他应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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