Skip to content

pianxian/Crashguard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crashguard

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

Crashguard is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'PXCrashguard'

Author

pianxian, [email protected]

License

Crashguard is available under the MIT license. See the LICENSE file for more info.

UseAge 启动崩溃防护

   [MiKiCrashGuard enableCrashGuardInstantly:true];

设置 ANR 时间,如果主线程卡顿超过 3 秒,输出 ANR

   [MiKiCrashGuard setStackDetectDuration:3];

发生 ANR 的回调

   [MiKiCrashGuard setANRStackDetectCallback:^(NSString *msg) {
     NSLog(msg);
   }];
   [MiKiCrashGuard startANRDetect];
   [MiKiCrashGuard startDispatchOnceDeadLockGuard];