Skip to content

Commit

Permalink
deps(react-native): Update bugsnag-cocoa to v6.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdowell committed Apr 26, 2021
1 parent a20c86b commit 0d3f244
Show file tree
Hide file tree
Showing 88 changed files with 704 additions and 482 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

### Changed

- (react-native): Update bugsnag-cocoa to v6.9.0
- App hangs that occur while an app is in the background will no longer be reported. [bugsnag-cocoa#1075](https://github.com/bugsnag/bugsnag-cocoa/pull/1075)
- Add `binaryArch` and `runningOnRosetta` to the `app` metadata tab. [bugsnag-cocoa#1073](https://github.com/bugsnag/bugsnag-cocoa/pull/1073)
- Bugsnag can now be used without AppKit, allowing use in daemons and other processes running in non-UI sessions. [bugsnag-cocoa#1072](https://github.com/bugsnag/bugsnag-cocoa/pull/1072)
- (react-native): Update bugsnag-android to v5.9.1
- Add projectPackages field to error payloads [bugsnag-android#1226](https://github.com/bugsnag/bugsnag-android/pull/1226)
- Fix deserialization bug in persisted NDK errors [bugsnag-android#1220](https://github.com/bugsnag/bugsnag-android/pull/1220)
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/ios/.bugsnag-cocoa-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5a002460e6a1bc0e51505709c7194a35ac340048
2f5925e6d61217901e8b6e25f9f146aa9f9d3fa1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Bugsnag",
"version": "6.8.4",
"version": "6.9.0",
"summary": "The Bugsnag crash reporting framework for Apple platforms.",
"homepage": "https://bugsnag.com",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
},
"source": {
"git": "https://github.com/bugsnag/bugsnag-cocoa.git",
"tag": "v6.8.4"
"tag": "v6.9.0"
},
"frameworks": [
"Foundation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@
01840B7425DC26E200F95648 /* BSGEventUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = 01840B6E25DC26E200F95648 /* BSGEventUploader.m */; };
01840B7525DC26E200F95648 /* BSGEventUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = 01840B6E25DC26E200F95648 /* BSGEventUploader.m */; };
0187D464255BD7B800C503D9 /* BugsnagApiClientTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CB9103632502320A00E9D1E2 /* BugsnagApiClientTest.m */; };
019480D42625F3EB00E833ED /* BSGAppKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 019480D32625F3EB00E833ED /* BSGAppKitTests.m */; };
01B14C56251CE55F00118748 /* report-react-native-promise-rejection.json in Resources */ = {isa = PBXBuildFile; fileRef = 01B14C55251CE55F00118748 /* report-react-native-promise-rejection.json */; };
01B14C57251CE55F00118748 /* report-react-native-promise-rejection.json in Resources */ = {isa = PBXBuildFile; fileRef = 01B14C55251CE55F00118748 /* report-react-native-promise-rejection.json */; };
01B14C58251CE55F00118748 /* report-react-native-promise-rejection.json in Resources */ = {isa = PBXBuildFile; fileRef = 01B14C55251CE55F00118748 /* report-react-native-promise-rejection.json */; };
Expand Down Expand Up @@ -1317,12 +1318,15 @@
0163BF5825823D8D008DC28B /* NotificationBreadcrumbTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationBreadcrumbTests.m; sourceTree = "<group>"; };
016875C4258D003200DFFF69 /* NSUserDefaultsStub.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSUserDefaultsStub.h; sourceTree = "<group>"; };
016875C5258D003200DFFF69 /* NSUserDefaultsStub.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSUserDefaultsStub.m; sourceTree = "<group>"; };
017824BD262D65A000D18AFA /* Bugsnag.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Bugsnag.xcconfig; sourceTree = "<group>"; };
01840B6D25DC26E200F95648 /* BSGEventUploader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BSGEventUploader.h; sourceTree = "<group>"; };
01840B6E25DC26E200F95648 /* BSGEventUploader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BSGEventUploader.m; sourceTree = "<group>"; };
01937CF9257A7B4C00F2DE31 /* Bugsnag+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bugsnag+Private.h"; sourceTree = "<group>"; };
01937D09257A7ED000F2DE31 /* BugsnagSessionTracker+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagSessionTracker+Private.h"; sourceTree = "<group>"; };
01937D11257A814D00F2DE31 /* BugsnagMetadata+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagMetadata+Private.h"; sourceTree = "<group>"; };
01937D2E257A83A900F2DE31 /* BugsnagApp+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagApp+Private.h"; sourceTree = "<group>"; };
019480C42625EE9800E833ED /* BSGAppKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BSGAppKit.h; sourceTree = "<group>"; };
019480D32625F3EB00E833ED /* BSGAppKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BSGAppKitTests.m; sourceTree = "<group>"; };
0195FC3B256BC81400DE6646 /* BugsnagEvent+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagEvent+Private.h"; sourceTree = "<group>"; };
0198762E2567D5AB000A7AF3 /* BugsnagStackframe+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagStackframe+Private.h"; sourceTree = "<group>"; };
01B14C55251CE55F00118748 /* report-react-native-promise-rejection.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "report-react-native-promise-rejection.json"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1641,6 +1645,7 @@
00AD1C6824869B0E00A27979 = {
isa = PBXGroup;
children = (
017824BD262D65A000D18AFA /* Bugsnag.xcconfig */,
01C2769B2601F44D006901EA /* CHANGELOG.md */,
01C2769C2601F455006901EA /* CONTRIBUTING.md */,
00E636B2248702A1006CBF1A /* README.md */,
Expand Down Expand Up @@ -1699,6 +1704,7 @@
00AD1C7F24869B0E00A27979 /* Tests */ = {
isa = PBXGroup;
children = (
019480D32625F3EB00E833ED /* BSGAppKitTests.m */,
00896A3F2486DBDD00DC48C2 /* BSGConfigurationBuilderTests.m */,
008966C62486D43600DC48C2 /* BSGConnectivityTest.m */,
01BDB1CE25DEBF4600A91FAF /* BSGEventUploadKSCrashReportOperationTests.m */,
Expand Down Expand Up @@ -1831,6 +1837,7 @@
008969142486DAD000DC48C2 /* BSG_RFC3339DateTool.m */,
010FF28225ED2A8D00E4F2B0 /* BSGAppHangDetector.h */,
010FF28325ED2A8D00E4F2B0 /* BSGAppHangDetector.m */,
019480C42625EE9800E833ED /* BSGAppKit.h */,
CBCF77A125010648004AF22A /* BSGJSONSerialization.h */,
CBCF77A225010648004AF22A /* BSGJSONSerialization.m */,
008968112486DA5600DC48C2 /* BSGSerialization.h */,
Expand Down Expand Up @@ -2838,6 +2845,7 @@
008967132486D43700DC48C2 /* BugsnagEventTests.m in Sources */,
0089675B2486D43700DC48C2 /* BugsnagEnabledBreadcrumbTest.m in Sources */,
008966EC2486D43700DC48C2 /* BugsnagDeviceTest.m in Sources */,
019480D42625F3EB00E833ED /* BSGAppKitTests.m in Sources */,
008967462486D43700DC48C2 /* BugsnagTests.m in Sources */,
008967A62486D43700DC48C2 /* KSString_Tests.m in Sources */,
004E353D2487B3B8007FBAE4 /* BugsnagSwiftTests.swift in Sources */,
Expand Down Expand Up @@ -3177,6 +3185,7 @@
/* Begin XCBuildConfiguration section */
00AD1C8424869B0E00A27979 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 017824BD262D65A000D18AFA /* Bugsnag.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
Expand Down Expand Up @@ -3246,12 +3255,12 @@
SDKROOT = iphoneos;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
WARNING_CFLAGS = "-Werror=incomplete-implementation";
};
name = Debug;
};
00AD1C8524869B0E00A27979 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 017824BD262D65A000D18AFA /* Bugsnag.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
Expand Down Expand Up @@ -3315,7 +3324,6 @@
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
WARNING_CFLAGS = "-Werror=incomplete-implementation";
};
name = Release;
};
Expand Down Expand Up @@ -3369,6 +3377,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = ./Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -3388,6 +3397,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = ./Tests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -3406,6 +3416,7 @@
00AD1CBF24869C1200A27979 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_MODULES_AUTOLINK = NO;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
Expand All @@ -3428,6 +3439,7 @@
00AD1CC024869C1200A27979 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_MODULES_AUTOLINK = NO;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
Expand All @@ -3452,6 +3464,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = ./Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -3472,6 +3485,7 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = ./Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -3535,6 +3549,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = ./Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -3555,6 +3570,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
GCC_TREAT_WARNINGS_AS_ERRORS = NO;
INFOPLIST_FILE = ./Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#if TARGET_OS_IOS || TARGET_OS_TV
#import "BSGUIKit.h"
#else
#import <AppKit/AppKit.h>
#import "BSGAppKit.h"
#endif


Expand All @@ -24,7 +24,7 @@

@interface BSGNotificationBreadcrumbs ()

@property NSDictionary<NSNotificationName, NSString *> *notificationNameMap;
@property (nonatomic) NSDictionary<NSNotificationName, NSString *> *notificationNameMap;

@end

Expand All @@ -37,7 +37,7 @@ - (instancetype)initWithConfiguration:(BugsnagConfiguration *)configuration
_configuration = configuration;
_notificationCenter = NSNotificationCenter.defaultCenter;
#if TARGET_OS_OSX
_workspaceNotificationCenter = NSWorkspace.sharedWorkspace.notificationCenter;
_workspaceNotificationCenter = [NSWORKSPACE sharedWorkspace].notificationCenter;
#endif
_breadcrumbSink = breadcrumbSink;
_notificationNameMap = @{
Expand Down Expand Up @@ -261,7 +261,7 @@ - (void)addBreadcrumbForNotification:(NSNotification *)notification {
[self addBreadcrumbWithType:BSGBreadcrumbTypeState forNotificationName:notification.name];
}

- (void)addBreadcrumbForTableViewNotification:(NSNotification *)notification {
- (void)addBreadcrumbForTableViewNotification:(__attribute__((unused)) NSNotification *)notification {
#if TARGET_OS_IOS || TARGET_OS_TV
NSIndexPath *indexPath = ((UITableView *)notification.object).indexPathForSelectedRow;
[self addBreadcrumbWithType:BSGBreadcrumbTypeNavigation forNotificationName:notification.name metadata:
Expand All @@ -273,15 +273,15 @@ - (void)addBreadcrumbForTableViewNotification:(NSNotification *)notification {
#endif
}

- (void)addBreadcrumbForMenuItemNotification:(NSNotification *)notification {
- (void)addBreadcrumbForMenuItemNotification:(__attribute__((unused)) NSNotification *)notification {
#if TARGET_OS_OSX
NSMenuItem *menuItem = [[notification userInfo] valueForKey:@"MenuItem"];
[self addBreadcrumbWithType:BSGBreadcrumbTypeState forNotificationName:notification.name metadata:
[menuItem isKindOfClass:[NSMenuItem class]] ? @{BSGKeyAction : menuItem.title} : nil];
[menuItem isKindOfClass:NSMENUITEM] ? @{BSGKeyAction : menuItem.title} : nil];
#endif
}

- (void)addBreadcrumbForControlNotification:(NSNotification *)notification {
- (void)addBreadcrumbForControlNotification:(__attribute__((unused)) NSNotification *)notification {
#if TARGET_OS_IOS
NSString *label = ((UIControl *)notification.object).accessibilityLabel;
[self addBreadcrumbWithType:BSGBreadcrumbTypeUser forNotificationName:notification.name metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@

@interface BugsnagBreadcrumbs ()

@property (readonly) NSString *breadcrumbsPath;
@property (readonly, nonatomic) NSString *breadcrumbsPath;

@property BugsnagConfiguration *config;
@property unsigned int nextFileNumber;
@property unsigned int maxBreadcrumbs;
@property (nonatomic) BugsnagConfiguration *config;
@property (nonatomic) unsigned int nextFileNumber;
@property (nonatomic) unsigned int maxBreadcrumbs;

@end

Expand Down Expand Up @@ -144,8 +144,8 @@ - (void)writeBreadcrumbData:(NSData *)data toFileNumber:(unsigned int)fileNumber
}

if (fileNumber >= self.maxBreadcrumbs) {
NSString *path = [self pathForFileNumber:fileNumber - self.maxBreadcrumbs];
if (![[NSFileManager defaultManager] removeItemAtPath:path error:&error]) {
NSString *oldPath = [self pathForFileNumber:fileNumber - self.maxBreadcrumbs];
if (![[NSFileManager defaultManager] removeItemAtPath:oldPath error:&error]) {
bsg_log_err(@"Unable to delete old breadcrumb: %@", error);
}
}
Expand Down Expand Up @@ -224,7 +224,7 @@ void BugsnagBreadcrumbsWriteCrashReport(const BSG_KSCrashReportWriter *writer) {
writer->beginArray(writer, "breadcrumbs");
for (unsigned int i = g_context.firstFileNumber; i < g_context.nextFileNumber; i++) {
int result = snprintf(path, sizeof(path), "%s/%u.json", g_context.directoryPath, i);
if (result < 0 || result >= sizeof(path)) {
if (result < 0 || result >= (int)sizeof(path)) {
bsg_log_err(@"Breadcrumb path is too long");
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ + (void)leaveBreadcrumbWithMessage:(NSString *_Nonnull)message

+ (NSArray<BugsnagBreadcrumb *> *_Nonnull)breadcrumbs {
if ([self bugsnagStarted]) {
return self.client.breadcrumbs.breadcrumbs;
return self.client.breadcrumbs.breadcrumbs ?: @[];
} else {
return @[];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@
#import "BSG_KSCrashType.h"
#import "BugsnagConfiguration.h"

@class BugsnagNotifier;

@interface BugsnagCrashSentry : NSObject

- (void)install:(BugsnagConfiguration *)config
notifier:(BugsnagNotifier *)notifier
onCrash:(BSGReportCallback)onCrash;
- (void)install:(BugsnagConfiguration *)config onCrash:(BSGReportCallback)onCrash;

- (BSG_KSCrashType)mapKSToBSGCrashTypes:(BugsnagErrorTypes *)errorTypes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

@implementation BugsnagCrashSentry

- (void)install:(BugsnagConfiguration *)config
notifier:(BugsnagNotifier *)notifier
onCrash:(BSGReportCallback)onCrash
- (void)install:(BugsnagConfiguration *)config onCrash:(BSGReportCallback)onCrash
{
BSG_KSCrash *ksCrash = [BSG_KSCrash sharedInstance];
ksCrash.introspectMemory = NO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN

@property (copy, nonatomic) NSString *codeBundleId;

@property (nullable) BugsnagSession *currentSession;
@property (nullable, nonatomic) BugsnagSession *currentSession;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
NSString *const BSGSessionUpdateNotification = @"BugsnagSessionChanged";

@interface BugsnagSessionTracker ()
@property (weak, nonatomic) BugsnagConfiguration *config;
@property (strong, nonatomic) BugsnagConfiguration *config;
@property (weak, nonatomic) BugsnagClient *client;
@property (strong, nonatomic) BugsnagSessionFileStore *sessionStore;
@property (strong, nonatomic) BugsnagSessionTrackingApiClient *apiClient;
Expand All @@ -40,7 +40,7 @@ @interface BugsnagSessionTracker ()
*/
@property (nonatomic, strong, readonly) SessionTrackerCallback callback;

@property NSMutableDictionary *extraRuntimeInfo;
@property (nonatomic) NSMutableDictionary *extraRuntimeInfo;
@end

@implementation BugsnagSessionTracker
Expand Down Expand Up @@ -111,7 +111,7 @@ - (void)startNewSessionIfAutoCaptureEnabled {

- (void)startNewSessionWithAutoCaptureValue:(BOOL)isAutoCaptured {
NSSet<NSString *> *releaseStages = self.config.enabledReleaseStages;
if (releaseStages != nil && ![releaseStages containsObject:self.config.releaseStage]) {
if (releaseStages != nil && ![releaseStages containsObject:self.config.releaseStage ?: @""]) {
return;
}
if (self.config.sessionURL == nil) {
Expand Down
Loading

0 comments on commit 0d3f244

Please sign in to comment.