Latest 0.2.4
Homepage https://github.com/nickcheng/NCCWL
License MIT
Platforms ios 6.1, requires ARC
Dependencies CocoaLumberjack, NSLogger, SSZipArchive, PLCrashReporter
Authors

CWL == Crash w/ Logs. When your app crash, zip and send the crash info and your recent logs.

Overview

This is a glue library.

  • It uses PLCrashReporter to generate crash log.
  • It uses CocoaLumberjack and NSLogger to log everything to a file and NSLoggerViewer.
  • When a crash occurred, next time you start the app, it’ll use ssziparcive to zip them all and call the block you set with the path of the zip file.

I didn’t expose all the properties of log and crash libraries. You can modify them in file NCCWL.m to fit your need.

Dependence

Open source libraries:

Other frameworks:

  • SystemConfiguration.framework
  • CFNetwork.framework
  • libz.dylib

Installation

Place NCCWL folder in your project. Add the dependences. That’s all.

Install w/ CocoaPods

Add code below in your Podfile. And run pod install.

pod 'NCCWL'

At last, you need to manual add CrashReporter.framework to your project. It is in (YourProjectFolder)/Pods/NCCWL.

Because I’m new to CocoaPods, you need to do the last extra step. If you have any idea with the CocoaPods spec file, please tell me. Thank you in advanced!

Usage

Import NCCWL.h in your main delegate file. and place the code below in your application:didFinishLaunchingWithOptions.

[[NCCWL sharedInstance] setCrashHandler:^(NSString *cwlFilePath) {
  // Handle your zipped crash and logs.
  // How about upload the zipped file to a remote server?
  [Uploader uploadFile:cwlFilePath];
}];

If you have any problems when using this engine, please feel free to drop me an issue or contact me:

Latest podspec

{
    "name": "NCCWL",
    "version": "0.2.4",
    "summary": "CWL == Crash w/ Logs. When your app crash, zip and send the crash info and your recent logs.",
    "description": "This is a glue library. nn* It uses [PLCrashReporter](https://code.google.com/p/plcrashreporter/) to generate crash log. n* It uses [CocoaLumberjack](https://github.com/robbiehanson/CocoaLumberjack) and [NSLogger](https://github.com/fpillet/NSLogger) to log everything to a file and NSLoggerViewer.n* When a crash occurred, next time you start the app, it'll use [ssziparcive](https://github.com/soffes/ssziparchive) to zip them all and call the block you set with the path of the zip file.nnI didn't expose all the properties of log and crash libraries. You can modify them in file ```NCCWL.m``` to fit your need.",
    "homepage": "https://github.com/nickcheng/NCCWL",
    "license": "MIT",
    "authors": {
        "nickcheng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nickcheng/NCCWL.git",
        "tag": "0.2.4"
    },
    "platforms": {
        "ios": "6.1"
    },
    "requires_arc": true,
    "source_files": "NCCWL",
    "public_header_files": "NCCWL/*.h",
    "dependencies": {
        "CocoaLumberjack": [
            "~> 2.3.0"
        ],
        "NSLogger": [
            "~> 1.5.1"
        ],
        "SSZipArchive": [
            "~> 1.2.0"
        ],
        "PLCrashReporter": [
            "~> 1.2"
        ]
    }
}

Pin It on Pinterest

Share This