Navita TEM应用程序如何获得通话logging信息?

Navita https://itunes.apple.com/us/app/navita-tem-personal/id590228620?mt=8如何设置显示通话logging?

如果我将应用程序从任务pipe理器中划掉,那么它将错过这些调用,这表明它必须使用CTCallCenter的callEventHandler,并且通过保存响应callEventHandlercallback的时间/持续时间来创build自己的通话logging。

但是,如果是这样的话,那么在后台怎么做呢? 我的印象是,callEventHandler只能在前台使用,而不能在后台使用?

该应用程序正在使用位置服务,但即使禁用此function,它仍然能够获得有关通话的信息​​(只要应用程序未被暂停)。 我虽然它可能使用后台位置更新,以保持自己准备接收callEventHandlercallback,但显然不是。

Navita应用程序还可以显示通话时间和通话时间。

奖励将被授予一个答案,其中包含足够的,准确的和详细的信息,使我能够模仿Navita应用程序的行为,具体来说,我必须能够编写一个应用程序,可以获得发生的电话的时间和持续时间而应用程序不在前台,而设备的位置服务被closures,并且在应用程序在后台的时间比通过使用beginBackgroundTaskWithExpirationHandler授予的〜3分钟更长之后:

Here is what I observe with the Navita app that I want to be able to reproduce: 1) Run app 2) Task away from app 3) Go to device settings, privacy, and turn off Location Services. 4) Go to device settings, privacy, background app refresh and turn off for the app 5) Wait > 10 minutes to make sure the app is not still in the background as a consequence of using beginBackgroundTaskWithExpirationHandler: 6) Call the device from another phone, answer the phone call, then hang up. 7) Launch the app again and display the call time and duration 

(这是iOS7和unjailbroken)

这是我从Navita TEM反汇编中find的资源。

应用程序使用两种背景模式 – 位置和audio。 你可以在Info.plist文件中看到它。 当您启用电话呼叫logging应用程序还将启用“警报”和“实时”开关。 当“警报”启用应用程序无限循环在背景“bg-sound.mp3”文件没有声音,这只是沉默。 因此,它不使用像这样的黑客如何使用CTCallCenter获取呼叫事件:setCallEventHandler:应用程序被暂停时发生? 。 这与使用位置类似的伎俩,以保持应用程序在后台运行,并接收电话事件。 不知何故,这并没有从AppStore中被拒绝。

如果您在应用程序处于后台时观察呼叫中心,则会在应用程序返回到前台时收到一组更新。 这个数据集可能不像应用程序主要在前台那样准确,但它包含了相当多的信息。