All Projects → nickcheng → NCCWL

nickcheng / NCCWL

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

Programming Languages

c
50402 projects - #5 most used programming language
objective c
16641 projects - #2 most used programming language
C++
36643 projects - #6 most used programming language
Objective-C++
1391 projects
Protocol Buffer
295 projects
shell
77523 projects

NCCWL

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:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].