Latest 0.1.3
Homepage https://github.com/maxgordeev/MGWatchdog
License MIT
Platforms ios 7.0, osx 10.8, requires ARC
Authors

[![CI Status](http://img.shields.io/travis/Max Gordeev/MGWatchdog.svg?style=flat)](https://travis-ci.org/Max Gordeev/MGWatchdog)
Version
License
Platform

Usage

Start the watchdog to catch use-cases that are freezes UI for more than 400 ms:

NSTimeInterval const delayInSeconds = 0.4; // 400 ms
[MGWatchdog startWithDelay:delayInSeconds handler:^{
    NSString *name = @"MGWatchdogException";
    NSString *reason = [NSString stringWithFormat:@"UI has been freezed for more than %.0f ms", delayinseconds * 1000.0];
    @throw [NSException exceptionWithName:name reason:reason userInfo:nil];
}];

After catching an exception you can simply analyze Main thread call stack and find the problem in your code.

Stop the watchdog:

[MGWatchdog stop];

If you have an unfixable UI freeze (ex. using of thirdparty UI libraries) you can simply tell watchdog to skip observing freezes till the end of current UI loop:

[MGWatchdog skipCurrentLoop];

Installation

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

platform :ios, '7.0'
pod "MGWatchdog"

Author

Max Gordeev, [email protected]

License

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

Latest podspec

{
    "name": "MGWatchdog",
    "version": "0.1.3",
    "summary": "iOS/OSX UI freezes analyzer.",
    "homepage": "https://github.com/maxgordeev/MGWatchdog",
    "license": "MIT",
    "authors": {
        "Max Gordeev": "[email protected]"
    },
    "source": {
        "git": "https://github.com/maxgordeev/MGWatchdog.git",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "7.0",
        "osx": "10.8"
    },
    "requires_arc": true,
    "source_files": "MGWatchdog/MGWatchdog/Sources/*.{h,m}",
    "public_header_files": "MGWatchdog/MGWatchdog/Sources/MGWatchdog.h",
    "ios": {
        "frameworks": "UIKit"
    }
}

Pin It on Pinterest

Share This