Latest 0.0.8.1
Homepage https://github.com/Deeer/KYCrashHandler
License MIT
Platforms ios 10.0, requires ARC
Frameworks Foundation, UIKit

Ability

  • Catch Crash
  • Generate Crash file & Save it locally.
  • Provide interface for uploading Crash file.
  • Provide interface for handling the instant crash.
  • Provide a plugin to grenerate related info about current env.

a simple and lightweight way to hanle the crash event ✈️ :]

Demo

effert

Some Logic

logic

Installation

To integrate it into your project using CocoaPods,specify it in your Podfile

  pod 'KYCrashHandler'

Then,run the following command:

pod install

Architecture

.
├── Category
│   ├── NSDate+TimeTool.h
│   └── NSDate+TimeTool.m
├── CrashHandler
│   ├── KYExceptionHandler.h
│   ├── KYExceptionHandler.m
│   ├── KYSignalHandler.h
│   └── KYSignalHandler.m
├── CrashHandlerCore
│   ├── KYClassFinder.h
│   ├── UIApplication+FindRepairViewController.h
│   ├── UIApplication+FindRepairViewController.m
│   ├── UIApplication+KYCrashHandler.h
│   └── UIApplication+KYCrashHandler.m
├── Interfaces
│   ├── KYExtraInfoPlugin
│   │   ├── KYExtraInfoPlugin.h
│   │   └── KYExtraInfoPlugin.m
│   ├── RepairViewController
│   │   ├── KYCrashRepairViewController.h
│   │   └── KYCrashRepairViewController.m
│   └── Uploader
│       ├── KYCrashLogUploadOperation.h
│       ├── KYCrashUploader.h
│       └── KYCrashUploader.m
├── KYCrashBusinessHandler.h
├── KYCrashBusinessHandler.m
├── Lib
│   ├── Aspects.h
│   └── Aspects.m
└── Storeage
    ├── KYCrashLocalStorage.h
    ├── KYCrashLocalStorage.m
    ├── KYTimeRecorder.h
    └── KYTimeRecorder.m

Usage

  • 1.Inheritant form KYCrashRepairViewController,Then implement didFinishRepairWithCompletion:, you could do something to do with the crash event(try to reset your database or clean some dirty data,etc)
  • 2.Inheritant form KYCrashUploader to handle upload businiess.

TODO

To be more powerful && more resonable

Latest podspec

{
    "name": "KYCrashHandler",
    "version": "0.0.8.1",
    "summary": "a tool to protect from crash and catch crashes.",
    "homepage": "https://github.com/Deeer/KYCrashHandler",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Koul Dela",
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/Deeer/KYCrashHandler.git",
        "tag": "v0.0.8.1"
    },
    "exclude_files": "CrashDemo/*.plist",
    "source_files": [
        "CrashDemo/Source/*",
        "CrashDemo/Source/**/*",
        "CrashDemo/Source/**/**/*",
        "CrashDemo/*.plist"
    ],
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This