This repository was archived by the owner on Sep 14, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
cocoa/vendor/bugsnag-cocoa/Source Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Changelog
22=========
33
4+
5+ ### Enhancements
6+
7+ * (iOS) Upgrade to bugsnag-cocoa v5.22.0:
8+ * Add configuration option (` reportOOMs ` ) to disable out-of-memory (OOM) event
9+ reporting, defaulting to enabled.
10+ [ bugsnag-cocoa #345 ] ( https://github.com/bugsnag/bugsnag-cocoa/pull/345 )
11+ * Disable background OOM reporting by default. It can be enabled using
12+ ` reportBackgroundOOMs ` .
13+ [ bugsnag-cocoa #345 ] ( https://github.com/bugsnag/bugsnag-cocoa/pull/345 )
14+
415## 2.18.0 (2019-05-08)
516
617* Collect version information in device.runtimeVersions
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ - (BOOL)computeDidOOMLastLaunchWithConfig:(BugsnagConfiguration *)config {
158158 [appInfo valueForKey: (__bridge NSString *)kCFBundleVersionKey ];
159159 BOOL sameVersions = [lastBootOSVersion isEqualToString: osVersion] &&
160160 [lastBootAppVersion isEqualToString: appVersion];
161- BOOL shouldReport = config.reportBackgroundOOMs || lastBootInForeground;
161+ BOOL shouldReport = config.reportOOMs && (config. reportBackgroundOOMs || lastBootInForeground) ;
162162 [self deleteSentinelFile ];
163163 return sameVersions && shouldReport;
164164 }
Original file line number Diff line number Diff line change @@ -160,7 +160,13 @@ NSArray<BeforeSendSession> *beforeSendSessionBlocks;
160160
161161/* *
162162 * Whether the app should report out of memory events which terminate the app
163- * while the app is in the background.
163+ * When NO, this setting overrides reportBackgroundOOMs.
164+ */
165+ @property BOOL reportOOMs;
166+
167+ /* *
168+ * Whether the app should report out of memory events which terminate the app
169+ * while the app is in the background. This setting has no effect when reportOOMs is NO.
164170 */
165171@property BOOL reportBackgroundOOMs;
166172
Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ - (id)init {
6868 _breadcrumbs = [BugsnagBreadcrumbs new ];
6969 _automaticallyCollectBreadcrumbs = YES ;
7070 _shouldAutoCaptureSessions = YES ;
71- _reportBackgroundOOMs = YES ;
71+ _reportBackgroundOOMs = NO ;
72+ _reportOOMs = YES ;
7273
7374 if ([NSURLSession class ]) {
7475 _session = [NSURLSession
Original file line number Diff line number Diff line change 4444#import < AppKit/AppKit.h>
4545#endif
4646
47- NSString *const NOTIFIER_VERSION = @" 5.21 .0" ;
47+ NSString *const NOTIFIER_VERSION = @" 5.22 .0" ;
4848NSString *const NOTIFIER_URL = @" https://github.com/bugsnag/bugsnag-cocoa" ;
4949NSString *const BSTabCrash = @" crash" ;
5050NSString *const BSAttributeDepth = @" depth" ;
@@ -384,7 +384,7 @@ - (void)start {
384384#endif
385385
386386 _started = YES ;
387- if (!bsg_ksmachisBeingTraced () && self.configuration .autoNotify ) {
387+ if (self. configuration . reportOOMs && !bsg_ksmachisBeingTraced () && self.configuration .autoNotify ) {
388388 [self .oomWatchdog enable ];
389389 }
390390
You can’t perform that action at this time.
0 commit comments