Skip to content

Latest commit

 

History

History
21 lines (19 loc) · 1019 Bytes

README.md

File metadata and controls

21 lines (19 loc) · 1019 Bytes

TBOOMDetector

Detect Out Of Memory events in an iOS app by process of elimination. If we can't figure out why the app is relaunching, it must have been the OOM Killer. For a complete explanation read this excellent blog post from Facebook.

Requires crashlytics for detecting crashes.

Example:

TBOOMDetector *oomDetector = [[TBOOMDetector alloc] initWithCrashlyticsApiKey:@"..."
  directory:directory 
   callback:^(TBTerminationType terminationType) {
      if(terminationType == TBTerminationTypeBackgroundOom) {
        DDLogError(@"Detected Background OOM");
        [Answers logCustomEventWithName:@"OOM Background Crash"
                       customAttributes:nil];
      } else if(terminationType == TBTerminationTypeForegroundOom) {
        DDLogError(@"Detected Foreground OOM");
        [Answers logCustomEventWithName:@"OOM foreground Crash"
                       customAttributes:nil];
      }
}];