Skip to content

Commit

Permalink
Merge pull request #1020 from bugsnag/release-v6.7.0
Browse files Browse the repository at this point in the history
Release v6.7.0
  • Loading branch information
nickdowell authored Mar 3, 2021
2 parents 6476eb4 + acc8487 commit dc551c9
Show file tree
Hide file tree
Showing 64 changed files with 887 additions and 116 deletions.
20 changes: 20 additions & 0 deletions .buildkite/pipeline.quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ steps:
commands:
- make bootstrap
- make analyze test
artifact_paths:
- xcodebuild.log

- label: macOS 10.14 unit tests
timeout_in_minutes: 10
Expand All @@ -22,6 +24,8 @@ steps:
commands:
- make bootstrap
- make analyze test
artifact_paths:
- xcodebuild.log

- label: iOS 13 unit tests
timeout_in_minutes: 10
Expand All @@ -37,6 +41,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: iOS 12 unit tests
timeout_in_minutes: 10
Expand All @@ -52,6 +58,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: iOS 11 unit tests
timeout_in_minutes: 10
Expand All @@ -67,6 +75,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: iOS 10 unit tests
timeout_in_minutes: 10
Expand All @@ -81,6 +91,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: tvOS 13 unit tests
timeout_in_minutes: 10
Expand All @@ -96,6 +108,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: tvOS 12 unit tests
timeout_in_minutes: 10
Expand All @@ -111,6 +125,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: tvOS 11 unit tests
timeout_in_minutes: 10
Expand All @@ -126,6 +142,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: tvOS 10 unit tests
timeout_in_minutes: 10
Expand All @@ -139,6 +157,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: ':apple: macOS 10.15 full end-to-end tests'
depends_on:
Expand Down
10 changes: 10 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ steps:
commands:
- make bootstrap
- make analyze test
artifact_paths:
- xcodebuild.log

- label: iOS 14 unit tests
timeout_in_minutes: 10
Expand All @@ -75,6 +77,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: iOS 9 unit tests
timeout_in_minutes: 10
Expand All @@ -89,6 +93,8 @@ steps:
- make bootstrap
- TEST_CONFIGURATION=Debug make test
- TEST_CONFIGURATION=Release make test
artifact_paths:
- xcodebuild.log

- label: tvOS 14 unit tests
timeout_in_minutes: 10
Expand All @@ -102,6 +108,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: tvOS 9 unit tests
timeout_in_minutes: 10
Expand All @@ -115,6 +123,8 @@ steps:
commands:
- make bootstrap
- make test
artifact_paths:
- xcodebuild.log

- label: ':ios: iOS 14 barebones end-to-end tests'
depends_on:
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.6.4/Bugsnag"
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.7.0/Bugsnag"
github_url: "https://github.com/bugsnag/bugsnag-cocoa"
hide_documentation_coverage: true
module: "Bugsnag"
module_version: "6.6.4"
module_version: "6.7.0"
objc: true
output: "docs"
readme: "README.md"
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.6.4",
"version": "6.7.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.6.4"
"tag": "v6.7.0"
},
"frameworks": [
"Foundation",
Expand Down
22 changes: 22 additions & 0 deletions Bugsnag.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,17 @@
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 */; };
01B6BB7E25D5777F00FC4DE6 /* BugsnagSwiftPublicAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 008966B02486D43500DC48C2 /* BugsnagSwiftPublicAPITests.swift */; };
01C17AE72542ED7F00C102C9 /* KSCrashReportWriterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 01C17AE62542ED7F00C102C9 /* KSCrashReportWriterTests.m */; };
01C17AE82542ED7F00C102C9 /* KSCrashReportWriterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 01C17AE62542ED7F00C102C9 /* KSCrashReportWriterTests.m */; };
01C17AE92542ED7F00C102C9 /* KSCrashReportWriterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 01C17AE62542ED7F00C102C9 /* KSCrashReportWriterTests.m */; };
01CCAEEA25D414D60057268D /* BugsnagLastRunInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 01CCAEE825D414D60057268D /* BugsnagLastRunInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
01CCAEEB25D414D60057268D /* BugsnagLastRunInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 01CCAEE825D414D60057268D /* BugsnagLastRunInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
01CCAEEC25D414D60057268D /* BugsnagLastRunInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 01CCAEE825D414D60057268D /* BugsnagLastRunInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
01CCAEED25D414D60057268D /* BugsnagLastRunInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 01CCAEE925D414D60057268D /* BugsnagLastRunInfo.m */; };
01CCAEEE25D414D60057268D /* BugsnagLastRunInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 01CCAEE925D414D60057268D /* BugsnagLastRunInfo.m */; };
01CCAEEF25D414D60057268D /* BugsnagLastRunInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 01CCAEE925D414D60057268D /* BugsnagLastRunInfo.m */; };
01CCAEF025D414D60057268D /* BugsnagLastRunInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 01CCAEE925D414D60057268D /* BugsnagLastRunInfo.m */; };
01E8765E256684E700F4B70A /* URLSessionMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 01E8765D256684E700F4B70A /* URLSessionMock.m */; };
01E8765F256684E700F4B70A /* URLSessionMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 01E8765D256684E700F4B70A /* URLSessionMock.m */; };
01E87660256684E700F4B70A /* URLSessionMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 01E8765D256684E700F4B70A /* URLSessionMock.m */; };
Expand Down Expand Up @@ -1299,6 +1307,9 @@
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>"; };
01C17AE62542ED7F00C102C9 /* KSCrashReportWriterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSCrashReportWriterTests.m; sourceTree = "<group>"; };
01CCAEE825D414D60057268D /* BugsnagLastRunInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BugsnagLastRunInfo.h; sourceTree = "<group>"; };
01CCAEE925D414D60057268D /* BugsnagLastRunInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BugsnagLastRunInfo.m; sourceTree = "<group>"; };
01CCAEFF25D4151C0057268D /* BugsnagLastRunInfo+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagLastRunInfo+Private.h"; sourceTree = "<group>"; };
01D8EC3C256FC6C3006F2A2D /* BugsnagConfiguration+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagConfiguration+Private.h"; sourceTree = "<group>"; };
01E8765C256684E700F4B70A /* URLSessionMock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = URLSessionMock.h; sourceTree = "<group>"; };
01E8765D256684E700F4B70A /* URLSessionMock.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = URLSessionMock.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1646,6 +1657,8 @@
00AD1EFD2486A17800A27979 /* BugsnagErrorReportSink.h */,
00AD1EF92486A17700A27979 /* BugsnagErrorReportSink.m */,
01937D01257A7E0E00F2DE31 /* BugsnagErrorReportSink+Private.h */,
01CCAEE925D414D60057268D /* BugsnagLastRunInfo.m */,
01CCAEFF25D4151C0057268D /* BugsnagLastRunInfo+Private.h */,
00AD1EF82486A17700A27979 /* BugsnagSessionTracker.h */,
00AD1F012486A17900A27979 /* BugsnagSessionTracker.m */,
01937D09257A7ED000F2DE31 /* BugsnagSessionTracker+Private.h */,
Expand Down Expand Up @@ -1923,6 +1936,7 @@
3A700A9124A63A8E0068CD1B /* BugsnagError.h */,
3A700A8724A63A8E0068CD1B /* BugsnagErrorTypes.h */,
3A700A8824A63A8E0068CD1B /* BugsnagEvent.h */,
01CCAEE825D414D60057268D /* BugsnagLastRunInfo.h */,
3A700A9324A63A8E0068CD1B /* BugsnagMetadata.h */,
3A700A8324A63A8E0068CD1B /* BugsnagMetadataStore.h */,
3A700A8E24A63A8E0068CD1B /* BugsnagPlugin.h */,
Expand Down Expand Up @@ -2038,6 +2052,7 @@
008969962486DAD100DC48C2 /* BSG_KSBacktrace_Private.h in Headers */,
00896A112486DAD100DC48C2 /* BSG_KSCrashSentry_CPPException.h in Headers */,
008969ED2486DAD100DC48C2 /* BSG_KSCrashDoctor.h in Headers */,
01CCAEEA25D414D60057268D /* BugsnagLastRunInfo.h in Headers */,
01468F5225876DC1002B0519 /* BSGNotificationBreadcrumbs.h in Headers */,
008968ED2486DAB800DC48C2 /* BugsnagFileStore.h in Headers */,
00896A292486DAD100DC48C2 /* BSG_KSCrashType.h in Headers */,
Expand Down Expand Up @@ -2136,6 +2151,7 @@
00896A122486DAD100DC48C2 /* BSG_KSCrashSentry_CPPException.h in Headers */,
008969EE2486DAD100DC48C2 /* BSG_KSCrashDoctor.h in Headers */,
01468F5325876DC1002B0519 /* BSGNotificationBreadcrumbs.h in Headers */,
01CCAEEB25D414D60057268D /* BugsnagLastRunInfo.h in Headers */,
008968EE2486DAB800DC48C2 /* BugsnagFileStore.h in Headers */,
00896A2A2486DAD100DC48C2 /* BSG_KSCrashType.h in Headers */,
008969DC2486DAD100DC48C2 /* BSG_KSCrash.h in Headers */,
Expand Down Expand Up @@ -2234,6 +2250,7 @@
00896A132486DAD100DC48C2 /* BSG_KSCrashSentry_CPPException.h in Headers */,
008969EF2486DAD100DC48C2 /* BSG_KSCrashDoctor.h in Headers */,
01468F5425876DC1002B0519 /* BSGNotificationBreadcrumbs.h in Headers */,
01CCAEEC25D414D60057268D /* BugsnagLastRunInfo.h in Headers */,
008968EF2486DAB800DC48C2 /* BugsnagFileStore.h in Headers */,
00896A2B2486DAD100DC48C2 /* BSG_KSCrashType.h in Headers */,
008969DD2486DAD100DC48C2 /* BSG_KSCrash.h in Headers */,
Expand Down Expand Up @@ -2514,6 +2531,7 @@
008968912486DA9600DC48C2 /* BugsnagError.m in Sources */,
0089687C2486DA9500DC48C2 /* BugsnagBreadcrumb.m in Sources */,
008967FA2486DA4500DC48C2 /* BugsnagApiClient.m in Sources */,
01CCAEED25D414D60057268D /* BugsnagLastRunInfo.m in Sources */,
CBCAF6FD25A457F90095771F /* BSGFileLocations.m in Sources */,
008967DE2486DA2D00DC48C2 /* BSGConfigurationBuilder.m in Sources */,
008968C72486DA9600DC48C2 /* BugsnagApp.m in Sources */,
Expand Down Expand Up @@ -2681,6 +2699,7 @@
0089687D2486DA9500DC48C2 /* BugsnagBreadcrumb.m in Sources */,
008967FB2486DA4500DC48C2 /* BugsnagApiClient.m in Sources */,
008967DF2486DA2D00DC48C2 /* BSGConfigurationBuilder.m in Sources */,
01CCAEEE25D414D60057268D /* BugsnagLastRunInfo.m in Sources */,
CBCAF6FE25A457F90095771F /* BSGFileLocations.m in Sources */,
008968C82486DA9600DC48C2 /* BugsnagApp.m in Sources */,
00AD1F242486A17900A27979 /* Bugsnag.m in Sources */,
Expand Down Expand Up @@ -2846,6 +2865,7 @@
0089687E2486DA9600DC48C2 /* BugsnagBreadcrumb.m in Sources */,
008967FC2486DA4500DC48C2 /* BugsnagApiClient.m in Sources */,
008967E02486DA2D00DC48C2 /* BSGConfigurationBuilder.m in Sources */,
01CCAEEF25D414D60057268D /* BugsnagLastRunInfo.m in Sources */,
CBCAF6FF25A457F90095771F /* BSGFileLocations.m in Sources */,
008968C92486DA9600DC48C2 /* BugsnagApp.m in Sources */,
00AD1F252486A17900A27979 /* Bugsnag.m in Sources */,
Expand Down Expand Up @@ -2939,6 +2959,7 @@
008967592486D43700DC48C2 /* BugsnagClientMirrorTest.m in Sources */,
0089676B2486D43700DC48C2 /* BugsnagSessionTrackerTest.m in Sources */,
E701FAA12490EF4A008D842F /* BugsnagApiValidationTest.m in Sources */,
01B6BB7E25D5777F00FC4DE6 /* BugsnagSwiftPublicAPITests.swift in Sources */,
0089677A2486D43700DC48C2 /* KSMachHeader_Tests.m in Sources */,
0089675F2486D43700DC48C2 /* BugsnagSessionTrackingPayloadTest.m in Sources */,
008967AA2486D43700DC48C2 /* KSCrashIdentifierTests.m in Sources */,
Expand Down Expand Up @@ -3010,6 +3031,7 @@
E7462913248907E500F92D67 /* BSG_KSSignalInfo.c in Sources */,
E7462914248907E500F92D67 /* BSG_KSString.c in Sources */,
E7462915248907E500F92D67 /* BSG_KSObjC.c in Sources */,
01CCAEF025D414D60057268D /* BugsnagLastRunInfo.m in Sources */,
E7462916248907E500F92D67 /* BSG_KSCrashType.c in Sources */,
E7462917248907E500F92D67 /* BSG_KSCrashSentry_User.c in Sources */,
E7462918248907E500F92D67 /* BSG_KSCrashSentry_Signal.c in Sources */,
Expand Down
13 changes: 13 additions & 0 deletions Bugsnag/Bugsnag.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@ + (BOOL)appDidCrashLastLaunch {
return NO;
}

+ (BugsnagLastRunInfo *)lastRunInfo {
if ([self bugsnagStarted]) {
return self.client.lastRunInfo;
}
return nil;
}

+ (void)markLaunchCompleted {
if ([self bugsnagStarted]) {
[self.client markLaunchCompleted];
}
}

+ (void)notify:(NSException *)exception {
if ([self bugsnagStarted]) {
[self.client notify:exception];
Expand Down
17 changes: 17 additions & 0 deletions Bugsnag/BugsnagLastRunInfo+Private.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// BugsnagLastRunInfo+Private.h
// Bugsnag
//
// Created by Nick Dowell on 10/02/2021.
// Copyright © 2021 Bugsnag Inc. All rights reserved.
//

#include "BugsnagLastRunInfo.h"

@interface BugsnagLastRunInfo ()

- (instancetype)initWithConsecutiveLaunchCrashes:(NSUInteger)consecutiveLaunchCrashes
crashed:(BOOL)crashed
crashedDuringLaunch:(BOOL)crashedDuringLaunch;

@end
24 changes: 24 additions & 0 deletions Bugsnag/BugsnagLastRunInfo.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// BugsnagLastRunInfo.m
// Bugsnag
//
// Created by Nick Dowell on 10/02/2021.
// Copyright © 2021 Bugsnag Inc. All rights reserved.
//

#import "BugsnagLastRunInfo+Private.h"

@implementation BugsnagLastRunInfo

- (instancetype)initWithConsecutiveLaunchCrashes:(NSUInteger)consecutiveLaunchCrashes
crashed:(BOOL)crashed
crashedDuringLaunch:(BOOL)crashedDuringLaunch {
if (self = [super init]) {
_consecutiveLaunchCrashes = consecutiveLaunchCrashes;
_crashed = crashed;
_crashedDuringLaunch = crashedDuringLaunch;
}
return self;
}

@end
3 changes: 3 additions & 0 deletions Bugsnag/BugsnagSystemState.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import <Foundation/Foundation.h>

#import "BugsnagConfiguration.h"

#define SYSTEMSTATE_KEY_APP @"app"
Expand Down Expand Up @@ -37,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN

- (void)setCodeBundleID:(NSString*)codeBundleID;

@property (nonatomic) NSUInteger consecutiveLaunchCrashes;

/**
* Purge all stored system state.
*/
Expand Down
14 changes: 13 additions & 1 deletion Bugsnag/BugsnagSystemState.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#import "BugsnagSessionTracker.h"
#import "BugsnagSystemState.h"

static NSString * const ConsecutiveLaunchCrashesKey = @"consecutiveLaunchCrashes";
static NSString * const InternalKey = @"internal";

static NSDictionary* loadPreviousState(BugsnagKVStore *kvstore, NSString *jsonPath) {
NSData *data = [NSData dataWithContentsOfFile:jsonPath];
if(data == nil) {
Expand Down Expand Up @@ -162,6 +165,7 @@ - (instancetype)initWithConfiguration:(BugsnagConfiguration *)config {
_lastLaunchState = loadPreviousState(_kvStore, _persistenceFilePath);
_currentLaunchStateRW = initCurrentState(_kvStore, config);
_currentLaunchState = [_currentLaunchStateRW copy];
_consecutiveLaunchCrashes = [_lastLaunchState[InternalKey][ConsecutiveLaunchCrashesKey] unsignedIntegerValue];
[self sync];

__weak __typeof__(self) weakSelf = self;
Expand Down Expand Up @@ -234,13 +238,21 @@ - (void)setCodeBundleID:(NSString*)codeBundleID {
[self setValue:codeBundleID forAppKey:BSGKeyCodeBundleId];
}

- (void)setConsecutiveLaunchCrashes:(NSUInteger)consecutiveLaunchCrashes {
[self setValue:@(_consecutiveLaunchCrashes = consecutiveLaunchCrashes) forKey:ConsecutiveLaunchCrashesKey inSection:InternalKey];
}

- (void)setValue:(id)value forAppKey:(NSString *)key {
[self setValue:value forKey:key inSection:SYSTEMSTATE_KEY_APP];
}

- (void)setValue:(id)value forKey:(NSString *)key inSection:(NSString *)section {
[self mutateLaunchState:^(NSMutableDictionary *state) {
state[section][key] = value;
if (state[section]) {
state[section][key] = value;
} else {
state[section] = [NSMutableDictionary dictionaryWithObjectsAndKeys:value, key, nil];
}
}];
}

Expand Down
Loading

0 comments on commit dc551c9

Please sign in to comment.