IOS蓝牙应用"由于信号9 QUOT终止;仅在背景模式

问题描述:

我发展目标C iOS应用它显示心脏率从蓝牙BLE与相应的图形。如果应用程序在前台一切叉罚款没有任何问题运行。

I am developing an IOS app in objective c which displays the heart rate from bluetooth BLE with a corresponding graphic. If the app runs in the foreground everything forks fine without any problem.

但是,如果应用程序进入后台模式BLE测量依然延续(我用使用蓝牙LE配件),但它是由一些几分钟或几秒钟的消息之后,OS封杀iPhone上的应用程序意外退出 - > 从调试消息:由于终止信号9

But if the app goes in background mode the BLE measuring still continues (I am using "Uses Bluetooth LE accessories") but it is killed by the OS after some minutes or some seconds with the message "The app on iPhone quit unexpectedly --> Message from debugger: Terminated due to signal 9.

我无法找出原因,当我看到在iPhone上应用这种情况只在后台模式,而不是在前台?

I can not find out why this happens only in background mode and not in the foreground when I see the app on the iPhone?

的CPU和内存使用率是前景或背景同样是130%和16 MB。

应用程序是2:40之后杀害

The app is killed after 2:40


当应用程序在后台模式和应用程序是利用例如这是在前台做了所有的事情完成的使用蓝牙LE附件的!而如果在 CPU使用率过高杀死的iOS应用程序适当终止信号9不仅如果内存使用率过高!的(我想,这其实是苹果文档中丢失)。

"All things which are done in the foreground" are done when the app is in background mode and the app is using by example "Uses Bluetooth LE accessories"! And if the CPU usage is too high iOS kills the app with "Terminated due to signal 9" not only if the memory usage is too high! (I think, this fact is missing in the Apple documentation).

要prevent应用程序被打死,而在后台,停止使用的东西做高的CPU,如渲染图像,当应用程序在后台模式!

To prevent the app to be killed while in background, stop doing high CPU using things, like rendering images, when the app is in background mode!