Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/109.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 应用程序在使用BKProcessAssertion进行远程推送时崩溃_Ios_Background_Google Analytics - Fatal编程技术网

Ios 应用程序在使用BKProcessAssertion进行远程推送时崩溃

Ios 应用程序在使用BKProcessAssertion进行远程推送时崩溃,ios,background,google-analytics,Ios,Background,Google Analytics,我集成了最新版本的Google Analytics SDK。我在我的应用程序中使用静默通知。 所以我需要一点时间来完成背景任务(大约30秒)。 我看到许多与允许时间有关的车祸 My App[3114] has active assertions beyond permitted time: {( <BKProcessAssertion: 0x15699c00> identifier: Background Content Fetching (15) process: MyA

我集成了最新版本的Google Analytics SDK。我在我的应用程序中使用静默通知。 所以我需要一点时间来完成背景任务(大约30秒)。 我看到许多与允许时间有关的车祸

My App[3114] has active assertions beyond permitted time: 
{(
    <BKProcessAssertion: 0x15699c00> identifier: Background Content Fetching (15) process: MyApp [3114] permittedBackgroundDuration: 30.000000 reason: backgroundContentFetching owner   
    pid:3101 preventSuspend  preventThrottleDownUI  preventIdleSleep  preventSuspendOnSleep 
)}
我认为崩溃与Google Analytics有关,我尝试在远程推送上关闭Google Analytics,如下所示:

  - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
    fetchCompletionHandler:(BackgroundFetchResultBlock)completionHandler {
  ...
  [GAI sharedInstance].optOut = YES;

但是它没有帮助。

请参阅。简而言之,问题是您的后台任务运行的时间超过了允许的时间量。自iOS6以来,允许的背景时间显著缩短;您可能需要重新检查设计并进行调整。

线程2看起来只是在等待接收要处理的事件。崩溃日志中有“突出显示的线程”吗?@Romula你解决过这个问题吗?我们现在看到了这一点,我们已经重做了背景,但仍然被GA毒蛇咬伤
  - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
    fetchCompletionHandler:(BackgroundFetchResultBlock)completionHandler {
  ...
  [GAI sharedInstance].optOut = YES;