Latest 1.0.1
Homepage https://github.com/diamantidis/AppEventTracker
License MIT
Platforms ios 9.3
Authors

CI Status
Version
License
Platform
Swift
codecov

AppEventTracker is an iOS library to automatically track various events by injecting code to different functions, like for example viewDidLoad, didReceiveMemoryWarning or sendAction.
The initial reason behind this library is to track the last 10, for example, events before a crash so that the user can get a better understanding of the user flow before the crash.

Example

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

Requirements

  • iOS 9.3+
  • Xcode 10.1+
  • Swift 4.2+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

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

pod 'AppEventTracker'

Then, run the following command:

$ pod install

Usage

// Import the library
import AppEventTracker
// Declare the number of the events to keep. 
AppEventTracker.configure(size: 10)
// Activate the events related with the viewDidLoad
AppEventTracker.enableViewDidLoad()
// Activate the events related with the UIButton's sendAction
AppEventTracker.enableUIButtonSendAction()
// Activate the events related with the UIViewController's didReceiveMemoryWarning
AppEventTracker.enableDidReceiveMemoryWarning()
// Get the events 
print(AppEventTracker.events)

Can be used to send description to Hockeyapp

func applicationLog(for crashManager: BITCrashManager!) -> String! {
// prints "UIViewController1 > UIViewController2 > UIViewController3"
return AppEventTracker.events.map{ $0.name }.joined(separator: " > ")
}

Author

Ioannis Diamantidis, [email protected]

License

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

Latest podspec

{
    "name": "AppEventTracker",
    "version": "1.0.1",
    "summary": "AppEventTracker is an iOS library to automatically track various events.",
    "description": "AppEventTracker is an iOS library to automatically track various events by injecting code to different functions, like for example `viewDidLoad`,  `didReceiveMemoryWarning` or `sendAction`.",
    "homepage": "https://github.com/diamantidis/AppEventTracker",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "diamantidis": "[email protected]"
    },
    "source": {
        "git": "https://github.com/diamantidis/AppEventTracker.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "9.3"
    },
    "swift_version": "4.2",
    "source_files": "AppEventTracker/Classes/**/*"
}

Pin It on Pinterest

Share This