连续启动 crash 自修复技术实现与原理解析

本文涉及的产品
公共DNS(含HTTPDNS解析),每月1000万次HTTP解析
日志服务 SLS,月写入数据量 50GB 1个月
全局流量管理 GTM,标准版 1个月
简介: **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - [前言](#%E5%89%8D%E8%A8%80) - [实现原理](#%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86) - [优化:降低50%以上误报机率](#%E4%BC%98%



Table of Contents generated with DocToc

作者:阿里云-移动云-大前端团队

前言

连续启动 Crash 应该是 crash 类型中zui,

在微信读书团队发布的《iOS 启动连续闪退保护方案》 一文中,给出了连续启动crash的自修复技术的思路讲解,并在GitHub上给出了技术实现,并开源了 GYBootingProtection。方案思路很好,很轻量级。

实现原理

在微信读书团队给出的文章中已经有比较详细的阐述,在此不做赘述,实现的流程图如下所示:

enter image description here

但有个实现上可以优化下,可以降低50%以上误报机率,监听用户手动划掉 APP 这个事件,其中一些特定场景,是可以获取的。另外在这里也给出对其 API 设计的建议。最后给出优化后的实现。

优化:降低50%以上误报机率

用户主动 kill 掉 APP 分为两种情况:

  • App在前台时用户手动划掉APP的时候
  • APP在后台时划掉APP

第一种场景更为常见,可以通过监听 UIApplicationWillTerminateNotification 来捕获该动作,捕获后恢复计数。第二种情况,无法监听到。但也足以降低 50% 以上的误报机率。

对原有API设计的几点优化意见

1. 机制状态应当用枚举来做为API透出

该机制当前所处的状态,比如:NeedFix 、isFixing,建议用枚举来做为API透出。比如:

typedef NS_ENUM(NSInteger, BootingProtectionStatus) {
   BootingProtectionStatusNormal,  /**<  APP 启动正常 */
   BootingProtectionStatusNormalChecking,  /**< 正在检测是否会在特定时间内是否会 Crash,注意:检测状态下“连续启动崩溃计数”个数小于或等于上限值 */
   BootingProtectionStatusNeedFix, /**< APP 出现连续启动 Crash,需要采取修复措施 */
   BootingProtectionStatusFixing,   /**< APP 出现连续启动 Crash,正在修复中... */
};

2. 关键数值应当做为初始化参数供用户设置

/*!
* 当前启动Crash的状态
*/
@property (nonatomic, assign, readonly) ABSBootingProtectionStatus bootingProtectionStatus;

/*!
* 达到需要执行上报操作的“连续启动崩溃计数”个数。
*/
@property (nonatomic, assign, readonly) NSUInteger continuousCrashOnLaunchNeedToReport;

/*!
* 达到需要执行修复操作的“连续启动崩溃计数”个数。
*/
@property (nonatomic, assign, readonly) NSUInteger continuousCrashOnLaunchNeedToFix;

/*!
* APP 启动后经过多少秒,可以将“连续启动崩溃计数”清零
*/
@property (nonatomic, assign, readonly) NSTimeInterval crashOnLaunchTimeIntervalThreshold;

3. 修复、上报逻辑应当支持用户异步操作

reportBlock 上报逻辑,
repairtBlock 修复逻辑

typedef void (^BoolCompletionHandler)(BOOL succeeded, NSError *error);
typedef void (^RepairBlock)(ABSBoolCompletionHandler completionHandler);

用户执行 BoolCompletionHandler 后即可知道是否执行完毕,并且支持异步操作。

异步操作带来的问题,可以通过前面提到的枚举API来实时监测状态,来决定各种其他操作。

什么时候会出现该异常?

连续启动 crash 自修复技术实现与原理解析

下面给出优化后的代码实现:

//
//  CYLBootingProtection.h
//  
//
//  Created by ChenYilong on 18/01/10.
//  Copyright © 2018年 ChenYilong. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^ABSBoolCompletionHandler)(BOOL succeeded, NSError *error);
typedef void (^ABSRepairBlock)(ABSBoolCompletionHandler completionHandler);
typedef void (^ABSReportBlock)(NSUInteger crashCounts);

typedef NS_ENUM(NSInteger, BootingProtectionStatus) {
   BootingProtectionStatusNormal,  /**<  APP 启动正常 */
   BootingProtectionStatusNormalChecking,  /**< 正在检测是否会在特定时间内是否会 Crash,注意:检测状态下“连续启动崩溃计数”个数小于或等于上限值 */
   BootingProtectionStatusNeedFix, /**< APP 出现连续启动 Crash,需要采取修复措施 */
   BootingProtectionStatusFixing,   /**< APP 出现连续启动 Crash,正在修复中... */
};

/**
* 启动连续 crash 保护。
* 启动后 `_crashOnLaunchTimeIntervalThreshold` 秒内 crash,反复超过 `_continuousCrashOnLaunchNeedToReport` 次则上报日志,超过 `_continuousCrashOnLaunchNeedToFix` 则启动修复操作。
*/
@interface CYLBootingProtection : NSObject

/**
* 启动连续 crash 保护方法。
* 前置条件:在 App 启动时注册 crash 处理函数,在 crash 时调用[CYLBootingProtection addCrashCountIfNeeded]。
* 启动后一定时间内(`crashOnLaunchTimeIntervalThreshold`秒内)crash,反复超过一定次数(`continuousCrashOnLaunchNeedToReport`次)则上报日志,超过一定次数(`continuousCrashOnLaunchNeedToFix`次)则启动修复程序;在一定时间内(`crashOnLaunchTimeIntervalThreshold`秒) 秒后若没有 crash 将“连续启动崩溃计数”计数置零。
 `reportBlock` 上报逻辑,
 `repairtBlock` 修复逻辑,完成后执行 `[self setCrashCount:0]`

*/
- (void)launchContinuousCrashProtect;

/*!
* 当前启动Crash的状态
*/
@property (nonatomic, assign, readonly) BootingProtectionStatus bootingProtectionStatus;

/*!
* 达到需要执行上报操作的“连续启动崩溃计数”个数。
*/
@property (nonatomic, assign, readonly) NSUInteger continuousCrashOnLaunchNeedToReport;

/*!
* 达到需要执行修复操作的“连续启动崩溃计数”个数。
*/
@property (nonatomic, assign, readonly) NSUInteger continuousCrashOnLaunchNeedToFix;

/*!
* APP 启动后经过多少秒,可以将“连续启动崩溃计数”清零
*/
@property (nonatomic, assign, readonly) NSTimeInterval crashOnLaunchTimeIntervalThreshold;

/*!
* 借助 context 可以让多个模块注册事件,并且事件 block 能独立执行,互不干扰。
*/
@property (nonatomic, copy, readonly) NSString *context;

/*!
* @details 启动后kCrashOnLaunchTimeIntervalThreshold秒内crash,反复超过continuousCrashOnLaunchNeedToReport次则上报日志,超过continuousCrashOnLaunchNeedToFix则启动修复程序;当所有操作完成后,执行 completion。在 crashOnLaunchTimeIntervalThreshold 秒后若没有 crash 将 kContinuousCrashOnLaunchCounterKey 计数置零。
* @param context 借助 context 可以让多个模块注册事件,并且事件 block 能独立执行,互不干扰。
*/
- (instancetype)initWithContinuousCrashOnLaunchNeedToReport:(NSUInteger)continuousCrashOnLaunchNeedToReport
                          continuousCrashOnLaunchNeedToFix:(NSUInteger)continuousCrashOnLaunchNeedToFix
                        crashOnLaunchTimeIntervalThreshold:(NSTimeInterval)crashOnLaunchTimeIntervalThreshold
                                                   context:(NSString *)context;
/*!
* 当前“连续启动崩溃“的状态
*/
+ (BootingProtectionStatus)bootingProtectionStatusWithContext:(NSString *)context continuousCrashOnLaunchNeedToFix:(NSUInteger)continuousCrashOnLaunchNeedToFix;

/*!
* 设置上报逻辑,参数 crashCounts 为启动连续 crash 次数
*/
- (void)setReportBlock:(ABSReportBlock)reportBlock;

/*!
* 设置修复逻辑
*/
- (void)setRepairBlock:(ABSRepairBlock)repairtBlock;

+ (void)setLogger:(void (^)(NSString *))logger;

@end
//
//  CYLBootingProtection.m
//
//
//  Created by ChenYilong on 18/01/10.
//  Copyright © 2018年 ChenYilong. All rights reserved.
//

#import "CYLBootingProtection.h"
#import <UIKit/UIKit.h>

static dispatch_queue_t _exceptionOperationQueue = 0;
void (^Logger)(NSString *log);

@interface CYLBootingProtection ()

@property (nonatomic, assign) NSUInteger continuousCrashOnLaunchNeedToReport;
@property (nonatomic, assign) NSUInteger continuousCrashOnLaunchNeedToFix;
@property (nonatomic, assign) NSTimeInterval crashOnLaunchTimeIntervalThreshold;
@property (nonatomic, copy) NSString *context;
@property (nonatomic, copy) ABSReportBlock reportBlock;
@property (nonatomic, copy) ABSRepairBlock repairBlock;

/*!
* 设置“连续启动崩溃计数”个数
*/
- (void)setCrashCount:(NSInteger)count;

/*!
* 设置“连续启动崩溃计数”个数
*/
+ (void)setCrashCount:(NSUInteger)count context:(NSString *)context;

/*!
* “连续启动崩溃计数”个数
*/
- (NSUInteger)crashCount;

/*!
* “连续启动崩溃计数”个数
*/
+ (NSUInteger)crashCountWithContext:(NSString *)context;

@end

@implementation CYLBootingProtection
+ (void)initialize {
   static dispatch_once_t onceToken;
   dispatch_once(&onceToken, ^{
       _exceptionOperationQueue = dispatch_queue_create("com.ChenYilong.CYLBootingProtection.fileCacheQueue", DISPATCH_QUEUE_SERIAL);
   });
}
- (instancetype)initWithContinuousCrashOnLaunchNeedToReport:(NSUInteger)continuousCrashOnLaunchNeedToReport
                          continuousCrashOnLaunchNeedToFix:(NSUInteger)continuousCrashOnLaunchNeedToFix
                        crashOnLaunchTimeIntervalThreshold:(NSTimeInterval)crashOnLaunchTimeIntervalThreshold
                                                   context:(NSString *)context {
   if (!(self = [super init])) {
       return nil;
   }
   _continuousCrashOnLaunchNeedToReport = continuousCrashOnLaunchNeedToReport;
   _continuousCrashOnLaunchNeedToFix = continuousCrashOnLaunchNeedToFix;
   _crashOnLaunchTimeIntervalThreshold = crashOnLaunchTimeIntervalThreshold;
   _context = [context copy];
   [[NSNotificationCenter defaultCenter] addObserver:self
                                            selector:@selector(applicationWillTerminate:)
                                                name:UIApplicationWillTerminateNotification
                                              object:[UIApplication sharedApplication]];
   return self;
}

/*!
* App在前台时用户手动划掉APP的时候,不计入检测。
* 但是APP在后台时划掉APP,无法检测出来。
* 见:https://stackoverflow.com/a/35041565/3395008
*/
- (void)applicationWillTerminate:(NSNotification *)note {
   BOOL isNormalChecking = [self isNormalChecking];
   if (isNormalChecking) {
       [self decreaseCrashCount];
   }
}

- (void)dealloc {
   [[NSNotificationCenter defaultCenter] removeObserver:self];
}

/*
支持同步修复、异步修复,两种修复方式
- 异步修复,不卡顿主UI,但有修复未完成就被再次触发crash、或者用户kill掉的可能。需要用户手动根据修复状态,来选择性地进行操作,应该有回掉。
- 同步修复,最简单直观,在主线程删除或者下载修复包。
*/
- (void)launchContinuousCrashProtect {
   NSAssert(_repairBlock, @"_repairBlock is nil!");
   [[self class] Logger:@"CYLBootingProtection: Launch continuous crash report"];
   [self resetBootingProtectionStatus];
   
   NSUInteger launchCrashes = [self crashCount];
   // 上报
   if (launchCrashes >= self.continuousCrashOnLaunchNeedToReport) {
       NSString *logString = [NSString stringWithFormat:@"CYLBootingProtection: App has continuously crashed for %@ times. Now synchronize uploading crash report and begin fixing procedure.", @(launchCrashes)];
       [[self class] Logger:logString];
       if (_reportBlock) {
           dispatch_async(dispatch_get_main_queue(),^{
               _reportBlock(launchCrashes);
           });
       }
   }
   
   // 修复
   if ([self isUpToBootingProtectionCount]) {
       [[self class] Logger:@"need to repair"];
       [self setIsFixing:YES];
       if (_repairBlock) {
           ABSBoolCompletionHandler completionHandler = ^(BOOL succeeded, NSError *__nullable error){
               if (succeeded) {
                   [self resetCrashCount];
               } else {
                   [[self class] Logger:error.description];
               }
           };
           dispatch_async(dispatch_get_main_queue(),^{
               _repairBlock(completionHandler);
           });
       }
   } else {
       [self increaseCrashCount:launchCrashes];
       // 正常流程,无需修复
       [[self class] Logger:@"need no repair"];
       
       // 记录启动时刻,用于计算启动连续 crash
       // 重置启动 crash 计数
       dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(self.crashOnLaunchTimeIntervalThreshold * NSEC_PER_SEC)), dispatch_get_main_queue(), ^(void){
           // APP活过了阈值时间,重置崩溃计数
           NSString *logString = [NSString stringWithFormat:@"CYLBootingProtection: long live the app ( more than %@ seconds ), now reset crash counts", @(self.crashOnLaunchTimeIntervalThreshold)];
           [[self class] Logger:logString];
           [self resetCrashCount];
       });
   }
}

//减少计数的时机:用户手动划掉APP
- (void)decreaseCrashCount {
   NSUInteger oldCrashCount = [self crashCount];
   [self decreaseCrashCountWithOldCrashCount:oldCrashCount];
}

- (void)decreaseCrashCountWithOldCrashCount:(NSUInteger)oldCrashCount {
   dispatch_sync(_exceptionOperationQueue, ^{
       if (oldCrashCount > 0) {
           [self setCrashCount:oldCrashCount-1];
       }
       [self resetBootingProtectionStatus];
   });
}

//重制计数的时机:修复完成、或者用户手动划掉APP
- (void)resetCrashCount {
   [self setCrashCount:0];
   [self resetBootingProtectionStatus];
}

//只在未达到计数上限时才会增加计数
- (void)increaseCrashCount:(NSUInteger)oldCrashCount {
   dispatch_sync(_exceptionOperationQueue, ^{
       [self setIsNormalChecking:YES];
       [self setCrashCount:oldCrashCount+1];
   });
}

- (void)resetBootingProtectionStatus {
   [self setIsNormalChecking:NO];
   [self setIsFixing:NO];
}

- (BootingProtectionStatus)bootingProtectionStatus {
   return [[self class] bootingProtectionStatusWithContext:_context continuousCrashOnLaunchNeedToFix:_continuousCrashOnLaunchNeedToFix];
}

/*!
*
@attention 注意之所以要检查 `BootingProtectionStatusNormalChecking` 原因如下:

`-launchContinuousCrashProtect` 方法与 `-bootingProtectionStatus` 方法,如果 `-launchContinuousCrashProtect` 先执行,那么会造成如下问题:
假设n为上限,但crash(n-1)次,但是用 `-bootingProtectionStatus` 判断出来,当前已经处于n次了。原因如下:

crash(n-1)次,正常流程,计数+1,变成n次,
随后在检查 `-bootingProtectionStatus` 时,发现已经处于异常状态了,实际是正常状态。所以需要使用`BootingProtectionStatusNormalChecking` 来进行区分。
*/
+ (BootingProtectionStatus)bootingProtectionStatusWithContext:(NSString *)context continuousCrashOnLaunchNeedToFix:(NSUInteger)continuousCrashOnLaunchNeedToFix {
   
   BOOL isNormalChecking = [self isNormalCheckingWithContext:context];
   if (isNormalChecking) {
       return BootingProtectionStatusNormalChecking;
   }
   
   BOOL isUpToBootingProtectionCount = [self isUpToBootingProtectionCountWithContext:context
                                                    continuousCrashOnLaunchNeedToFix:continuousCrashOnLaunchNeedToFix];
   if (!isUpToBootingProtectionCount) {
       return BootingProtectionStatusNormal;
   }
   
   BootingProtectionStatus type;
   BOOL isFixingCrash = [self isFixingCrashWithContext:context];
   if (isFixingCrash) {
       type = BootingProtectionStatusFixing;
   } else {
       type = BootingProtectionStatusNeedFix;
   }
   return type;
}

- (NSUInteger)crashCount {
   return [[self class] crashCountWithContext:_context];
}

- (void)setCrashCount:(NSInteger)count {
   if (count >=0) {
       [[self class] setCrashCount:count context:_context];
   }
}

- (void)setIsFixing:(BOOL)isFixingCrash {
   [[self class] setIsFixing:isFixingCrash context:_context];
}

/*!
* 是否正在修复
*/
- (BOOL)isFixingCrash {
   return [[self class] isFixingCrashWithContext:_context];
}

- (void)setIsNormalChecking:(BOOL)isNormalChecking {
   [[self class] setIsNormalChecking:isNormalChecking context:_context];
}

/*!
* 是否正在检查
*/
- (BOOL)isNormalChecking {
   return [[self class] isNormalCheckingWithContext:_context];
}

+ (NSUInteger)crashCountWithContext:(NSString *)context {
   NSString *continuousCrashOnLaunchCounterKey = [self continuousCrashOnLaunchCounterKeyWithContext:context];
   NSUInteger crashCount = [[NSUserDefaults standardUserDefaults] integerForKey:continuousCrashOnLaunchCounterKey];
   NSString *logString = [NSString stringWithFormat:@"crashCount:%@", @(crashCount)];
   [[self class] Logger:logString];
   return crashCount;
}

+ (void)setCrashCount:(NSUInteger)count context:(NSString *)context {
   NSString *continuousCrashOnLaunchCounterKey = [self continuousCrashOnLaunchCounterKeyWithContext:context];
   NSString *logString = [NSString stringWithFormat:@"setCrashCount:%@", @(count)];
   [[self class] Logger:logString];
   NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
   [defaults setInteger:count forKey:continuousCrashOnLaunchCounterKey];
   [defaults synchronize];
}

+ (void)setIsFixing:(BOOL)isFixingCrash context:(NSString *)context {
   NSString *continuousCrashFixingKey = [[self class] continuousCrashFixingKeyWithContext:context];
   NSString *logString = [NSString stringWithFormat:@"setisFixingCrash:{%@}", @(isFixingCrash)];
   [[self class] Logger:logString];
   NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
   [defaults setBool:isFixingCrash forKey:continuousCrashFixingKey];
   [defaults synchronize];
}

+ (BOOL)isFixingCrashWithContext:(NSString *)context {
   NSString *continuousCrashFixingKey = [[self class] continuousCrashFixingKeyWithContext:context];
   BOOL isFixingCrash = [[NSUserDefaults standardUserDefaults] boolForKey:continuousCrashFixingKey];
   NSString *logString = [NSString stringWithFormat:@"isFixingCrash:%@", @(isFixingCrash)];
   [[self class] Logger:logString];
   return isFixingCrash;
}

+ (void)setIsNormalChecking:(BOOL)isNormalChecking context:(NSString *)context {
   NSString *continuousCrashNormalCheckingKey = [[self class] continuousCrashNormalCheckingKeyWithContext:context];
   NSString *logString = [NSString stringWithFormat:@"setIsNormalChecking:{%@}", @(isNormalChecking)];
   [[self class] Logger:logString];
   NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
   [defaults setBool:isNormalChecking forKey:continuousCrashNormalCheckingKey];
   [defaults synchronize];
}

+ (BOOL)isNormalCheckingWithContext:(NSString *)context {
   NSString *continuousCrashFixingKey = [[self class] continuousCrashNormalCheckingKeyWithContext:context];
   BOOL isFixingCrash = [[NSUserDefaults standardUserDefaults] boolForKey:continuousCrashFixingKey];
   NSString *logString = [NSString stringWithFormat:@"isIsNormalChecking:%@", @(isFixingCrash)];
   [[self class] Logger:logString];
   return isFixingCrash;
}

- (BOOL)isUpToBootingProtectionCount {
   return [[self class] isUpToBootingProtectionCountWithContext:_context continuousCrashOnLaunchNeedToFix:_continuousCrashOnLaunchNeedToFix];
}

+ (BOOL)isUpToBootingProtectionCountWithContext:(NSString *)context continuousCrashOnLaunchNeedToFix:(NSUInteger)continuousCrashOnLaunchNeedToFix {
   BOOL isUpToCount = [self crashCountWithContext:context] >= continuousCrashOnLaunchNeedToFix;
   if (isUpToCount) {
       return YES;
   }
   return NO;
}

- (void)setReportBlock:(ABSReportBlock)block {
   _reportBlock = block;
}

- (void)setRepairBlock:(ABSRepairBlock)block {
   _repairBlock = block;
}

/*!
*  “连续启动崩溃计数”个数,对应的Key
*  默认为 "_CONTINUOUS_CRASH_COUNTER_KEY"
*/
+ (NSString *)continuousCrashOnLaunchCounterKeyWithContext:(NSString *)context {
   BOOL isValid = [[self class] isValidString:context];
   NSString *validContext = isValid ? context : @"";
   NSString *continuousCrashOnLaunchCounterKey = [NSString stringWithFormat:@"%@_CONTINUOUS_CRASH_COUNTER_KEY", validContext];
   return continuousCrashOnLaunchCounterKey;
}

/*!
*  是否正在修复记录,对应的Key
*  默认为 "_CONTINUOUS_CRASH_FIXING_KEY"
*/
+ (NSString *)continuousCrashFixingKeyWithContext:(NSString *)context {
   BOOL isValid = [[self class] isValidString:context];
   NSString *validContext = isValid ? context : @"";
   NSString *continuousCrashFixingKey = [NSString stringWithFormat:@"%@_CONTINUOUS_CRASH_FIXING_KEY", validContext];
   return continuousCrashFixingKey;
}

/*!
*  是否正在检查是否在特定时间内会Crash,对应的Key
*  默认为 "_CONTINUOUS_CRASH_CHECKING_KEY"
*/
+ (NSString *)continuousCrashNormalCheckingKeyWithContext:(NSString *)context {
   BOOL isValid = [[self class] isValidString:context];
   NSString *validContext = isValid ? context : @"";
   NSString *continuousCrashFixingKey = [NSString stringWithFormat:@"%@_CONTINUOUS_CRASH_CHECKING_KEY", validContext];
   return continuousCrashFixingKey;
}

#pragma mark -
#pragma mark - log and util Methods

+ (void)setLogger:(void (^)(NSString *))logger {
   Logger = [logger copy];
}

+ (void)Logger:(NSString *)log {
   if (Logger) Logger(log);
}

+ (BOOL)isValidString:(id)notValidString {
   if (!notValidString) {
       return NO;
   }
   if (![notValidString isKindOfClass:[NSString class]]) {
       return NO;
   }
   NSInteger stringLength = 0;
   @try {
       stringLength = [notValidString length];
   } @catch (NSException *exception) {}
   if (stringLength == 0) {
       return NO;
   }
   return YES;
}

@end

下面是相应的验证步骤:

等待15秒会有对应计数清零的操作日志输出:

2018-01-18 16:25:37.162980+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:CYLBootingProtection: Launch continuous crash report
2018-01-18 16:25:37.163140+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:setIsNormalChecking:{0}
2018-01-18 16:25:37.165738+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:setisFixingCrash:{0}
2018-01-18 16:25:37.166883+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:crashCount:0
2018-01-18 16:25:37.167102+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:crashCount:0
2018-01-18 16:25:37.167253+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:setIsNormalChecking:{1}
2018-01-18 16:25:37.167938+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:setCrashCount:1
2018-01-18 16:25:37.168806+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:need no repair










2018-01-18 16:25:52.225197+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:CYLBootingProtection: long live the app ( more than 15 seconds ), now reset crash counts
2018-01-18 16:25:52.225378+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:setCrashCount:0
2018-01-18 16:25:52.226234+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:setIsNormalChecking:{0}
2018-01-18 16:25:52.226595+0800 BootingProtection[89773:15553277] ?类名与方法名:-[AppDelegate onBeforeBootingProtection]_block_invoke(在第45行),描述:setisFixingCrash:{0}
相关文章
|
23天前
|
网络协议 网络安全 网络虚拟化
本文介绍了十个重要的网络技术术语,包括IP地址、子网掩码、域名系统(DNS)、防火墙、虚拟专用网络(VPN)、路由器、交换机、超文本传输协议(HTTP)、传输控制协议/网际协议(TCP/IP)和云计算
本文介绍了十个重要的网络技术术语,包括IP地址、子网掩码、域名系统(DNS)、防火墙、虚拟专用网络(VPN)、路由器、交换机、超文本传输协议(HTTP)、传输控制协议/网际协议(TCP/IP)和云计算。通过这些术语的详细解释,帮助读者更好地理解和应用网络技术,应对数字化时代的挑战和机遇。
66 3
|
23天前
|
存储 网络协议 安全
30 道初级网络工程师面试题,涵盖 OSI 模型、TCP/IP 协议栈、IP 地址、子网掩码、VLAN、STP、DHCP、DNS、防火墙、NAT、VPN 等基础知识和技术,帮助小白们充分准备面试,顺利踏入职场
本文精选了 30 道初级网络工程师面试题,涵盖 OSI 模型、TCP/IP 协议栈、IP 地址、子网掩码、VLAN、STP、DHCP、DNS、防火墙、NAT、VPN 等基础知识和技术,帮助小白们充分准备面试,顺利踏入职场。
66 2
|
26天前
|
监控 关系型数据库 MySQL
MySQL自增ID耗尽应对策略:技术解决方案全解析
在数据库管理中,MySQL的自增ID(AUTO_INCREMENT)属性为表中的每一行提供了一个唯一的标识符。然而,当自增ID达到其最大值时,如何处理这一情况成为了数据库管理员和开发者必须面对的问题。本文将探讨MySQL自增ID耗尽的原因、影响以及有效的应对策略。
88 3
|
28天前
|
Kubernetes Cloud Native 云计算
云原生技术深度解析:重塑企业IT架构的未来####
本文深入探讨了云原生技术的核心理念、关键技术组件及其对企业IT架构转型的深远影响。通过剖析Kubernetes、微服务、容器化等核心技术,本文揭示了云原生如何提升应用的灵活性、可扩展性和可维护性,助力企业在数字化转型中保持领先地位。 ####
|
13天前
|
存储 供应链 算法
深入解析区块链技术的核心原理与应用前景
深入解析区块链技术的核心原理与应用前景
38 0
|
14天前
|
机器学习/深度学习 人工智能 自然语言处理
探索深度学习与自然语言处理的前沿技术:Transformer模型的深度解析
探索深度学习与自然语言处理的前沿技术:Transformer模型的深度解析
43 0
|
16天前
|
JavaScript 前端开发 API
Vue.js响应式原理深度解析:从Vue 2到Vue 3的演进
Vue.js响应式原理深度解析:从Vue 2到Vue 3的演进
45 0
|
22天前
|
API 持续交付 网络架构
深入解析微服务架构:原理、优势与实践
深入解析微服务架构:原理、优势与实践
22 0
|
23天前
|
存储 供应链 物联网
深入解析区块链技术的核心原理与应用前景
深入解析区块链技术的核心原理与应用前景
|
23天前
|
存储 供应链 安全
深度解析区块链技术的核心原理与应用前景
深度解析区块链技术的核心原理与应用前景
31 0

推荐镜像

更多