gumob / CallStackParser

A swift library to parse call stack symbol supporting iOS, tvOS, watchOS, and macOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Carthage compatible Version Platform Build Status Language Packagist

CallStackParser

A swift library to parse call stack symbol supporting iOS, tvOS, watchOS, and macOS. Most of all source codes are ported from GDXRepo/CallStackParser. The version on this repository is added multiple platform support, support for Carthage and Cocoapods.

Requirements

CallStackParser supports multiple platforms

  • iOS 9.0 or later
  • macOS 10.10 or later
  • tvOS 9.0 or later
  • watchOS 2.0 or later
  • Swift 4.2

Installation

Carthage

Add the following to your Cartfile and follow these instructions.

github "gumob/CallStackParser"

CocoaPods

To integrate CallStackParser into your project, add the following to your Podfile.

pod 'CallStackParser'

Usage

Print simplified call stack symbols:

import CallStackParser

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        foo()
    }

    func foo() {
        bar()
    }

    func bar() {
        print(Thread.simpleCallStackString)
        // [CallStack:3/3] ViewController                       bar()
        // [CallStack:2/3] ViewController                       foo()
        // [CallStack:1/3] ViewController                       viewDidLoad()
    }

}

Read the API reference, or check example projects for detailed information.

Copyright

CallStackParser is released under MIT license, which means you can modify it, redistribute it or use it however you like.

About

A swift library to parse call stack symbol supporting iOS, tvOS, watchOS, and macOS.

License:MIT License


Languages

Language:Swift 69.4%Language:JavaScript 19.3%Language:Ruby 4.2%Language:SCSS 4.2%Language:HTML 1.9%Language:Shell 0.9%Language:Objective-C 0.2%