Skip to content
This repository was archived by the owner on Sep 14, 2020. It is now read-only.

Commit b593a90

Browse files
committed
chore(ios): Upgrade bugsnag-cocoa dep to 5.22.0
1 parent cbeb424 commit b593a90

5 files changed

Lines changed: 23 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
Changelog
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

cocoa/vendor/bugsnag-cocoa/Source/BSGOutOfMemoryWatchdog.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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

cocoa/vendor/bugsnag-cocoa/Source/BugsnagConfiguration.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

cocoa/vendor/bugsnag-cocoa/Source/BugsnagNotifier.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#import <AppKit/AppKit.h>
4545
#endif
4646

47-
NSString *const NOTIFIER_VERSION = @"5.21.0";
47+
NSString *const NOTIFIER_VERSION = @"5.22.0";
4848
NSString *const NOTIFIER_URL = @"https://github.com/bugsnag/bugsnag-cocoa";
4949
NSString *const BSTabCrash = @"crash";
5050
NSString *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

0 commit comments

Comments
 (0)