Skip to content

Commit

Permalink
Merge pull request #1121 from bugsnag/release-v6.9.6
Browse files Browse the repository at this point in the history
Release v6.9.6
  • Loading branch information
nickdowell authored Jun 16, 2021
2 parents ca5cdd3 + a44f34f commit 61a3095
Show file tree
Hide file tree
Showing 33 changed files with 122 additions and 197 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on: [push]

jobs:
build:
runs-on: macos-11.0
runs-on: macos-11
env:
DEVELOPER_DIR: /Applications/Xcode_12.5.app
DEVELOPER_DIR: /Applications/Xcode_13.0.app
PLATFORM: iOS
OS: 14.5
OS: "15.0"
steps:
- name: Checkout
uses: actions/checkout@v2
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.9.5/Bugsnag"
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.9.6/Bugsnag"
github_url: "https://github.com/bugsnag/bugsnag-cocoa"
hide_documentation_coverage: true
module: "Bugsnag"
module_version: "6.9.5"
module_version: "6.9.6"
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.9.5",
"version": "6.9.6",
"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.9.5"
"tag": "v6.9.6"
},
"frameworks": [
"Foundation",
Expand Down
1 change: 1 addition & 0 deletions Bugsnag.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CLANG_WARN_ASSIGN_ENUM = YES // -Wassign-enum
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES // -Wblock-capture-autoreleasing
CLANG_WARN_BOOL_CONVERSION = YES // -Wbool-conversion
CLANG_WARN_COMMA = YES // -Wcomma
CLANG_WARN_COMPLETION_HANDLER_MISUSE = YES // -Wcompletion-handler
CLANG_WARN_CONSTANT_CONVERSION = YES // -Wconstant-conversion
CLANG_WARN_DOCUMENTATION_COMMENTS = YES // -Wdocumentation
CLANG_WARN_EMPTY_BODY = YES // -Wempty-body
Expand Down
18 changes: 0 additions & 18 deletions Bugsnag.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,6 @@
010FF28825ED2A8D00E4F2B0 /* BSGAppHangDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = 010FF28325ED2A8D00E4F2B0 /* BSGAppHangDetector.m */; };
010FF28925ED2A8D00E4F2B0 /* BSGAppHangDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = 010FF28325ED2A8D00E4F2B0 /* BSGAppHangDetector.m */; };
010FF28A25ED2A8D00E4F2B0 /* BSGAppHangDetector.m in Sources */ = {isa = PBXBuildFile; fileRef = 010FF28325ED2A8D00E4F2B0 /* BSGAppHangDetector.m */; };
011ADCE326049A3600B20D72 /* BugsnagClient+OutOfMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 011ADCE126049A3600B20D72 /* BugsnagClient+OutOfMemory.h */; };
011ADCE426049A3600B20D72 /* BugsnagClient+OutOfMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 011ADCE126049A3600B20D72 /* BugsnagClient+OutOfMemory.h */; };
011ADCE526049A3600B20D72 /* BugsnagClient+OutOfMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 011ADCE126049A3600B20D72 /* BugsnagClient+OutOfMemory.h */; };
012482A325627B51003F7243 /* UIKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 012482A225627B51003F7243 /* UIKitTests.m */; };
0126DF1B257A92860031A70C /* BugsnagSession+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 0126DF1A257A92860031A70C /* BugsnagSession+Private.h */; };
0126DF1C257A92860031A70C /* BugsnagSession+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 0126DF1A257A92860031A70C /* BugsnagSession+Private.h */; };
Expand Down Expand Up @@ -636,9 +633,6 @@
0126F7BF25DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0126F7BA25DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.m */; };
0126F7C025DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0126F7BA25DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.m */; };
0126F7C125DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0126F7BA25DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.m */; };
0127149225F6171000D3500A /* BugsnagClient+AppHangs.h in Headers */ = {isa = PBXBuildFile; fileRef = 0127149025F6171000D3500A /* BugsnagClient+AppHangs.h */; };
0127149325F6171000D3500A /* BugsnagClient+AppHangs.h in Headers */ = {isa = PBXBuildFile; fileRef = 0127149025F6171000D3500A /* BugsnagClient+AppHangs.h */; };
0127149425F6171000D3500A /* BugsnagClient+AppHangs.h in Headers */ = {isa = PBXBuildFile; fileRef = 0127149025F6171000D3500A /* BugsnagClient+AppHangs.h */; };
0140D29A25767C9A00FD0306 /* BugsnagApiClientTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CB9103632502320A00E9D1E2 /* BugsnagApiClientTest.m */; };
01447605256684500018AB94 /* BugsnagApiClientTest.m in Sources */ = {isa = PBXBuildFile; fileRef = CB9103632502320A00E9D1E2 /* BugsnagApiClientTest.m */; };
01468F5225876DC1002B0519 /* BSGNotificationBreadcrumbs.h in Headers */ = {isa = PBXBuildFile; fileRef = 01468F5025876DC1002B0519 /* BSGNotificationBreadcrumbs.h */; };
Expand Down Expand Up @@ -1283,8 +1277,6 @@
00E636C324878FFC006CBF1A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
010FF28225ED2A8D00E4F2B0 /* BSGAppHangDetector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BSGAppHangDetector.h; sourceTree = "<group>"; };
010FF28325ED2A8D00E4F2B0 /* BSGAppHangDetector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BSGAppHangDetector.m; sourceTree = "<group>"; };
011ADCE126049A3600B20D72 /* BugsnagClient+OutOfMemory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagClient+OutOfMemory.h"; sourceTree = "<group>"; };
01210B7C25CD661800D683BB /* BugsnagThread+Recording.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagThread+Recording.h"; sourceTree = "<group>"; };
012482A225627B51003F7243 /* UIKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIKitTests.m; sourceTree = "<group>"; };
0126DED7257A87F40031A70C /* BugsnagAppWithState+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagAppWithState+Private.h"; sourceTree = "<group>"; };
0126DEDF257A89490031A70C /* BugsnagBreadcrumb+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagBreadcrumb+Private.h"; sourceTree = "<group>"; };
Expand All @@ -1300,7 +1292,6 @@
0126F7AA25DD5118008483C2 /* BSGEventUploadFileOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BSGEventUploadFileOperation.m; sourceTree = "<group>"; };
0126F7B925DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BSGEventUploadKSCrashReportOperation.h; sourceTree = "<group>"; };
0126F7BA25DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BSGEventUploadKSCrashReportOperation.m; sourceTree = "<group>"; };
0127149025F6171000D3500A /* BugsnagClient+AppHangs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagClient+AppHangs.h"; sourceTree = "<group>"; };
0134524A256BCF7C0088C548 /* BugsnagError+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagError+Private.h"; sourceTree = "<group>"; };
0134524B256BD00A0088C548 /* BugsnagThread+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagThread+Private.h"; sourceTree = "<group>"; };
0140D24725765F8F00FD0306 /* BSGUIKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BSGUIKit.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1780,8 +1771,6 @@
isa = PBXGroup;
children = (
008967BB2486DA1900DC48C2 /* BugsnagClient.m */,
0127149025F6171000D3500A /* BugsnagClient+AppHangs.h */,
011ADCE126049A3600B20D72 /* BugsnagClient+OutOfMemory.h */,
008967BC2486DA1900DC48C2 /* BugsnagClient+Private.h */,
);
path = Client;
Expand Down Expand Up @@ -1895,7 +1884,6 @@
008968582486DA9500DC48C2 /* BugsnagStateEvent.m */,
008968612486DA9500DC48C2 /* BugsnagThread.m */,
0134524B256BD00A0088C548 /* BugsnagThread+Private.h */,
01210B7C25CD661800D683BB /* BugsnagThread+Recording.h */,
0089685F2486DA9500DC48C2 /* BugsnagUser.m */,
0126DF34257A94740031A70C /* BugsnagUser+Private.h */,
);
Expand Down Expand Up @@ -2040,7 +2028,6 @@
0126F7BB25DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.h in Headers */,
008968DE2486DAA700DC48C2 /* BugsnagPluginClient.h in Headers */,
008969EA2486DAD100DC48C2 /* BSG_KSCrashReport.h in Headers */,
011ADCE326049A3600B20D72 /* BugsnagClient+OutOfMemory.h in Headers */,
008969F02486DAD100DC48C2 /* BSG_KSCrashReportFields.h in Headers */,
00896A2F2486DAD100DC48C2 /* BSG_KSCrashIdentifier.h in Headers */,
008969FC2486DAD100DC48C2 /* BSG_KSCrashAdvanced.h in Headers */,
Expand All @@ -2057,7 +2044,6 @@
008968F42486DAB800DC48C2 /* BugsnagSessionFileStore.h in Headers */,
008968882486DA9600DC48C2 /* BugsnagHandledState.h in Headers */,
CBCF77A325010648004AF22A /* BSGJSONSerialization.h in Headers */,
0127149225F6171000D3500A /* BugsnagClient+AppHangs.h in Headers */,
00896A082486DAD100DC48C2 /* BSG_KSCrashSentry_Private.h in Headers */,
008969722486DAD000DC48C2 /* BSG_KSSignalInfo.h in Headers */,
008967C22486DA1900DC48C2 /* BugsnagClient+Private.h in Headers */,
Expand Down Expand Up @@ -2144,7 +2130,6 @@
0126F7BC25DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.h in Headers */,
008968DF2486DAA700DC48C2 /* BugsnagPluginClient.h in Headers */,
008969EB2486DAD100DC48C2 /* BSG_KSCrashReport.h in Headers */,
011ADCE426049A3600B20D72 /* BugsnagClient+OutOfMemory.h in Headers */,
008969F12486DAD100DC48C2 /* BSG_KSCrashReportFields.h in Headers */,
00896A302486DAD100DC48C2 /* BSG_KSCrashIdentifier.h in Headers */,
008969FD2486DAD100DC48C2 /* BSG_KSCrashAdvanced.h in Headers */,
Expand All @@ -2161,7 +2146,6 @@
0126F79C25DD510E008483C2 /* BSGEventUploadObjectOperation.h in Headers */,
008968892486DA9600DC48C2 /* BugsnagHandledState.h in Headers */,
00896A092486DAD100DC48C2 /* BSG_KSCrashSentry_Private.h in Headers */,
0127149325F6171000D3500A /* BugsnagClient+AppHangs.h in Headers */,
CBCF77A425010648004AF22A /* BSGJSONSerialization.h in Headers */,
008969732486DAD000DC48C2 /* BSG_KSSignalInfo.h in Headers */,
008967C32486DA1900DC48C2 /* BugsnagClient+Private.h in Headers */,
Expand Down Expand Up @@ -2248,7 +2232,6 @@
0126F7BD25DD512B008483C2 /* BSGEventUploadKSCrashReportOperation.h in Headers */,
008968E02486DAA700DC48C2 /* BugsnagPluginClient.h in Headers */,
008969EC2486DAD100DC48C2 /* BSG_KSCrashReport.h in Headers */,
011ADCE526049A3600B20D72 /* BugsnagClient+OutOfMemory.h in Headers */,
008969F22486DAD100DC48C2 /* BSG_KSCrashReportFields.h in Headers */,
00896A312486DAD100DC48C2 /* BSG_KSCrashIdentifier.h in Headers */,
008969FE2486DAD100DC48C2 /* BSG_KSCrashAdvanced.h in Headers */,
Expand All @@ -2265,7 +2248,6 @@
0126F79D25DD510E008483C2 /* BSGEventUploadObjectOperation.h in Headers */,
0089688A2486DA9600DC48C2 /* BugsnagHandledState.h in Headers */,
00896A0A2486DAD100DC48C2 /* BSG_KSCrashSentry_Private.h in Headers */,
0127149425F6171000D3500A /* BugsnagClient+AppHangs.h in Headers */,
CBCF77A525010648004AF22A /* BSGJSONSerialization.h in Headers */,
008969742486DAD100DC48C2 /* BSG_KSSignalInfo.h in Headers */,
008967C42486DA1900DC48C2 /* BugsnagClient+Private.h in Headers */,
Expand Down
2 changes: 2 additions & 0 deletions Bugsnag/Breadcrumbs/BugsnagBreadcrumbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)addBreadcrumbWithBlock:(BSGBreadcrumbConfiguration)block;

- (NSArray<BugsnagBreadcrumb *> *)breadcrumbsBeforeDate:(NSDate *)date;

/**
* Returns the breadcrumb JSON dictionaries stored on disk.
*/
Expand Down
14 changes: 14 additions & 0 deletions Bugsnag/Breadcrumbs/BugsnagBreadcrumbs.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#import "BSGFileLocations.h"
#import "BSGJSONSerialization.h"
#import "BSG_KSCrashReportWriter.h"
#import "BSG_RFC3339DateTool.h"
#import "BugsnagBreadcrumb+Private.h"
#import "BugsnagCollections.h"
#import "BugsnagConfiguration+Private.h"
#import "BugsnagLogger.h"

Expand Down Expand Up @@ -62,6 +64,18 @@ - (instancetype)initWithConfiguration:(BugsnagConfiguration *)config {
return [self loadBreadcrumbsAsDictionaries:NO] ?: @[];
}

- (NSArray<BugsnagBreadcrumb *> *)breadcrumbsBeforeDate:(nonnull NSDate *)date {
// Because breadcrumbs are stored with only millisecond accuracy, we must also round the beforeDate in the same way.
NSString *dateString = [BSG_RFC3339DateTool stringFromDate:date];
return BSGArrayMap(self.breadcrumbs, ^id _Nullable(BugsnagBreadcrumb *crumb) {
// Using `timestampString` is more efficient because `timestamp` is a computed by parsing `timestampString`.
if ([crumb.timestampString compare:dateString] == NSOrderedDescending) {
return nil;
}
return crumb;
});
}

- (void)addBreadcrumb:(NSString *)breadcrumbMessage {
[self addBreadcrumbWithBlock:^(BugsnagBreadcrumb *_Nonnull crumb) {
crumb.message = breadcrumbMessage;
Expand Down
55 changes: 0 additions & 55 deletions Bugsnag/Bugsnag.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@

static BugsnagClient *bsg_g_bugsnag_client = NULL;

@interface NSDictionary (BSGKSMerge)
- (NSDictionary *)BSG_mergedInto:(NSDictionary *)dest;
@end

@implementation Bugsnag

+ (BugsnagClient *_Nonnull)start {
Expand Down Expand Up @@ -357,54 +353,3 @@ + (void)removeOnBreadcrumbBlock:(BugsnagOnBreadcrumbBlock _Nonnull)block {
}

@end

//
// NSDictionary+Merge.m
//
// Created by Karl Stenerud on 2012-10-01.
//
// Copyright (c) 2012 Karl Stenerud. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall remain in place
// in this source code.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

@implementation NSDictionary (BSGKSMerge)

- (NSDictionary *)BSG_mergedInto:(NSDictionary *)dest {
if ([dest count] == 0) {
return self;
}
if ([self count] == 0) {
return dest;
}

NSMutableDictionary *dict = [dest mutableCopy];
for (id key in [self allKeys]) {
id srcEntry = self[key];
id dstEntry = dest[key];
if ([dstEntry isKindOfClass:[NSDictionary class]] &&
[srcEntry isKindOfClass:[NSDictionary class]]) {
srcEntry = [srcEntry BSG_mergedInto:dstEntry];
}
dict[key] = srcEntry;
}
return dict;
}

@end
24 changes: 0 additions & 24 deletions Bugsnag/Client/BugsnagClient+AppHangs.h

This file was deleted.

21 changes: 0 additions & 21 deletions Bugsnag/Client/BugsnagClient+OutOfMemory.h

This file was deleted.

7 changes: 7 additions & 0 deletions Bugsnag/Client/BugsnagClient+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ NS_ASSUME_NONNULL_BEGIN

- (BugsnagDeviceWithState *)generateDeviceWithState:(NSDictionary *)systemInfo;

- (BugsnagEvent *)generateOutOfMemoryEvent;

/// @return A `BugsnagEvent` if the last run ended with a fatal app hang, `nil` otherwise.
- (nullable BugsnagEvent *)loadFatalAppHangEvent;

- (void)notifyInternal:(BugsnagEvent *)event block:(nullable BugsnagOnErrorBlock)block;

- (void)removeObserverWithBlock:(BugsnagObserverBlock)block; // Used in BugsnagReactNative
Expand All @@ -142,6 +147,8 @@ NS_ASSUME_NONNULL_BEGIN

- (void)start;

- (void)startAppHangDetector;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 61a3095

Please sign in to comment.