Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v6.9.0 #1076

Merged
merged 29 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ed69201
Stack trace entries whose symbol address cannot be determined will no…
kstenerud Apr 14, 2021
d810ca8
Allow use without AppKit
nickdowell Apr 13, 2021
0598248
Fix storage path for processes with no bundleIdentifier
nickdowell Apr 14, 2021
3904050
Merge pull request #1072 from bugsnag/nickdowell/without-appkit
nickdowell Apr 14, 2021
4a3a654
Add binaryArch and runningOnRosetta to app metadata
nickdowell Apr 15, 2021
12d6302
Disable OCLint "too few branches in switch statement" warning
nickdowell Apr 15, 2021
1a6a172
Merge pull request #1073 from bugsnag/nickdowell/binary-arch
nickdowell Apr 16, 2021
26c74e7
Merge pull request #1070 from bugsnag/6235-stack-symbol-address
kstenerud Apr 19, 2021
4e0ec33
Add Bugsnag.xcconfig
nickdowell Apr 19, 2021
dcda039
-Warc-repeated-use-of-weak
nickdowell Apr 19, 2021
6e2bb17
-Wconversion
nickdowell Apr 19, 2021
5a0cee6
Disable -Werror for unit test targets
nickdowell Apr 19, 2021
9e2a3bb
-Wexplicit-ownership-type
nickdowell Apr 19, 2021
a56da4f
-Wimplicit-atomic-properties
nickdowell Apr 19, 2021
b2adc09
-Wnullable-to-nonnull-conversion
nickdowell Apr 19, 2021
c79c87e
-Wshadow
nickdowell Apr 19, 2021
722f4fa
-Wno-unknown-warning-option
nickdowell Apr 19, 2021
bbe120d
-Wsign-compare
nickdowell Apr 19, 2021
2bcb9f1
-Wstrict-selector-match
nickdowell Apr 19, 2021
5a9b97e
-Wunused-parameter
nickdowell Apr 19, 2021
3623093
-Wsign-conversion
nickdowell Apr 19, 2021
bd51610
-Wmissing-braces
nickdowell Apr 19, 2021
18b24b5
-Wobjc-signed-char-bool-implicit-int-conversion
nickdowell Apr 19, 2021
42ad97b
-Wimplicit-int-float-conversion
nickdowell Apr 19, 2021
9396811
Ignore app hangs while app is in the background
nickdowell Apr 20, 2021
a44e4ba
Use appium 1.8.0 on iOS 10 & 11
nickdowell Apr 20, 2021
cecef10
Merge pull request #1074 from bugsnag/nickdowell/warnings
nickdowell Apr 20, 2021
a41c943
Merge pull request #1075 from bugsnag/nickdowell/ignore-app-hangs-in-…
nickdowell Apr 21, 2021
5c94827
Release v6.9.0
nickdowell Apr 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ steps:
- "--app=/app/build/iOSTestApp.ipa"
- "--farm=bs"
- "--device=IOS_11_0_IPHONE_8_PLUS"
- "--appium-version=1.7.0"
- "--appium-version=1.8.0"
- "--fail-fast"
concurrency: 9
concurrency_group: browserstack-app
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/pipeline.quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ steps:
- "--app=/app/build/iOSTestApp.ipa"
- "--farm=bs"
- "--device=IOS_10"
- "--appium-version=1.7.0"
- "--appium-version=1.8.0"
- "--fail-fast"
- "-e"
- "features/[o-z].*.feature"
Expand All @@ -246,7 +246,7 @@ steps:
- "--app=/app/build/iOSTestApp.ipa"
- "--farm=bs"
- "--device=IOS_10"
- "--appium-version=1.7.0"
- "--appium-version=1.8.0"
- "--fail-fast"
- "-e"
- "features/[a-n].*.feature"
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ steps:
- "--app=/app/build/iOSTestApp.ipa"
- "--farm=bs"
- "--device=IOS_10"
- "--appium-version=1.7.0"
- "--appium-version=1.8.0"
- "--fail-fast"
concurrency: 9
concurrency_group: browserstack-app
Expand Down
4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ author_url: "https://www.bugsnag.com"
author: "Bugsnag Inc"
clean: false # avoid deleting docs/.git
framework_root: "Bugsnag"
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.8.4/Bugsnag"
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.9.0/Bugsnag"
github_url: "https://github.com/bugsnag/bugsnag-cocoa"
hide_documentation_coverage: true
module: "Bugsnag"
module_version: "6.8.4"
module_version: "6.9.0"
objc: true
output: "docs"
readme: "README.md"
Expand Down
2 changes: 2 additions & 0 deletions .oclint
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# vim: set ft=yaml

# https://oclint-docs.readthedocs.io/en/stable/rules/index.html
disable-rules:
- BitwiseOperatorInConditional # Used quite a bit in KSCrash
- CollapsibleIfStatements # Fixing violations would churn a lot of code
Expand All @@ -14,6 +15,7 @@ disable-rules:
- ParameterReassignment
- PreferEarlyExit # Fixing violations would churn a lot of code
- ShortVariableName
- TooFewBranchesInSwitchStatement
- UnnecessaryElseStatement # Fixing violations would churn a lot of code
- UnusedMethodParameter # Quite common for notification handlers
- UselessParentheses # False positive for e.g. ULONG_MAX
Expand Down
4 changes: 2 additions & 2 deletions Bugsnag.podspec.json
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
19 changes: 19 additions & 0 deletions Bugsnag.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

GCC_TREAT_WARNINGS_AS_ERRORS = YES

WARNING_CFLAGS = $(inherited) -Warc-repeated-use-of-weak -Wassign-enum
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wblock-capture-autoreleasing -Wbool-conversion
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wcomma -Wconditional-uninitialized -Wconstant-conversion -Wconversion
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wdeprecated-declarations -Wdeprecated-implementations -Wdeprecated-objc-isa-usage -Wdocumentation -Wduplicate-method-match
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wempty-body -Wenum-conversion -Wexplicit-ownership-type
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wfloat-conversion -Wfour-char-constants -Wframework-include-private-from-public
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wimplicit-atomic-properties -Wimplicit-int-float-conversion -Wimplicit-retain-self -Wincompatible-pointer-types
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wincomplete-implementation -Winfinite-recursion -Wint-conversion
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wmissing-braces
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wno-unknown-warning-option -Wnon-literal-null-conversion -Wnonportable-include-path -Wnullable-to-nonnull-conversion
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wobjc-literal-conversion -Wobjc-root-class
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wparentheses -Wpointer-sign -Wprotocol
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wreturn-type
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wsign-conversion -Wstrict-prototypes -Wstrict-selector-match -Wswitch
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wundeclared-selector -Wunguarded-availability -Wuninitialized -Wunknown-pragmas -Wunreachable-code
WARNING_CFLAGS = $(WARNING_CFLAGS) -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable
20 changes: 18 additions & 2 deletions Bugsnag.xcodeproj/project.pbxproj
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
14 changes: 7 additions & 7 deletions Bugsnag/Breadcrumbs/BSGNotificationBreadcrumbs.m
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
14 changes: 7 additions & 7 deletions Bugsnag/Breadcrumbs/BugsnagBreadcrumbs.m
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
2 changes: 1 addition & 1 deletion Bugsnag/Bugsnag.m
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
6 changes: 1 addition & 5 deletions Bugsnag/BugsnagCrashSentry.h
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
4 changes: 1 addition & 3 deletions Bugsnag/BugsnagCrashSentry.m
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
2 changes: 1 addition & 1 deletion Bugsnag/BugsnagSessionTracker+Private.h
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
Loading