iphone杀后台应用 [英] iphone killing background apps

查看:320
本文介绍了iphone杀后台应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法杀后台应用?

Is there a way to kill background apps?

我有我上运行的应用记录一个声音,然后绘制出来一个滚动视图我与它的问题是,因为它运行的内存试图绘制它崩溃,如果记录太长。我的修复程序,这是监察的可用内存和predict的内存使用情况绘图将如何利用和停止录制之前没有足够的量。这样做的问题是更多的应用程序我都在后台运行越早停止录音,而不是杀死后台应用,使空间的ios一个didRecieveMemoryWarning前执行的方式。要重申我的问题我怎么能杀掉这些后台应用程序?将苹果看不上呢?

I have an app that I am working on that records a sound and then plots it out on a scroll view the problem I had with it is it crashes if the recording is too long because it runs out of memory trying to plot it. My fix to this is to monitor the amount of free memory and predict how much memory usage plotting will take and stop the recording just before there is not enough. The problem with that is the more apps I have running in the background the sooner it stops recording instead of killing background apps to make space the way that ios does before a didRecieveMemoryWarning. To restate my Question how can I kill these background apps? Will Apple frown upon this?

推荐答案

您想杀死其他背景从前台应用程序编程应用程序?我怀疑苹果不会赞成这一点。

You want to kill other background apps programmatically from your foreground app? I suspect Apple would frown on that.

在理论上可以从sysctl的得到他们的进程id的,并送他们一个SIGKILL终止他们,但iOS版的不会让你获取其他进程的信息,除非你是root(这意味着越狱)。

In theory you can get their process id's from sysctl and send them a SIGKILL to terminate them, but iOS won't let you get info about other processes unless you are root (which means jailbreaking).

这篇关于iphone杀后台应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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