Skip to content

joshuafeldman/TBOOMDetector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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];
      }
}];

About

Detect Out Of Memory events in an iOS app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 87.2%
  • Ruby 5.8%
  • C 4.7%
  • C++ 2.3%