diff --git a/Bugsnag.podspec.json b/Bugsnag.podspec.json index ec75cacd0..043fb640f 100644 --- a/Bugsnag.podspec.json +++ b/Bugsnag.podspec.json @@ -38,6 +38,7 @@ "Source/BugsnagConfiguration.h", "Source/BugsnagDevice.h", "Source/BugsnagDeviceWithState.h", + "Source/BugsnagEndpointConfiguration.h", "Source/BugsnagError.h", "Source/BugsnagEvent.h", "Source/BugsnagMetadata.h", diff --git a/OSX/Bugsnag.xcodeproj/project.pbxproj b/OSX/Bugsnag.xcodeproj/project.pbxproj index abf0b57e6..579da1016 100644 --- a/OSX/Bugsnag.xcodeproj/project.pbxproj +++ b/OSX/Bugsnag.xcodeproj/project.pbxproj @@ -51,6 +51,13 @@ 8A87352C1C6D3B1600EDBD5B /* BSG_KSCrashReportWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A87352B1C6D3B1600EDBD5B /* BSG_KSCrashReportWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8AD1E3FA23EDDD4F0044F919 /* BSGConnectivityTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8AD1E3F823EDDD3F0044F919 /* BSGConnectivityTest.m */; }; 8AD9FA891E086351002859A7 /* BugsnagConfigurationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8AD9FA851E0862DC002859A7 /* BugsnagConfigurationTests.m */; }; + E71DB9F6244763B400D0161E /* BugsnagEndpointConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = E71DB9F4244763B400D0161E /* BugsnagEndpointConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E71DB9F7244763B400D0161E /* BugsnagEndpointConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DB9F5244763B400D0161E /* BugsnagEndpointConfiguration.m */; }; + E71DBA0224485D1D00D0161E /* BugsnagSessionTrackerStopTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DB9FC24485D1C00D0161E /* BugsnagSessionTrackerStopTest.m */; }; + E71DBA0324485D1D00D0161E /* BugsnagClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DB9FE24485D1D00D0161E /* BugsnagClientTests.m */; }; + E71DBA0424485D1D00D0161E /* BugsnagTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DB9FF24485D1D00D0161E /* BugsnagTests.m */; }; + E71DBA0524485D1D00D0161E /* BugsnagMetadataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DBA0024485D1D00D0161E /* BugsnagMetadataTests.m */; }; + E71DBA0624485D1D00D0161E /* BugsnagPluginTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DBA0124485D1D00D0161E /* BugsnagPluginTest.m */; }; E722105E243B6A0F0083CF15 /* BugsnagStackframeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E722105D243B6A0E0083CF15 /* BugsnagStackframeTest.m */; }; E72352C11F55924A00436528 /* BSGConnectivity.h in Headers */ = {isa = PBXBuildFile; fileRef = E72352BF1F55924A00436528 /* BSGConnectivity.h */; }; E72352C21F55924A00436528 /* BSGConnectivity.m in Sources */ = {isa = PBXBuildFile; fileRef = E72352C01F55924A00436528 /* BSGConnectivity.m */; }; @@ -274,6 +281,14 @@ 8A87352B1C6D3B1600EDBD5B /* BSG_KSCrashReportWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSG_KSCrashReportWriter.h; path = ../Source/BSG_KSCrashReportWriter.h; sourceTree = SOURCE_ROOT; }; 8AD1E3F823EDDD3F0044F919 /* BSGConnectivityTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSGConnectivityTest.m; sourceTree = ""; }; 8AD9FA851E0862DC002859A7 /* BugsnagConfigurationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagConfigurationTests.m; path = ../Tests/BugsnagConfigurationTests.m; sourceTree = SOURCE_ROOT; }; + E71DB9F4244763B400D0161E /* BugsnagEndpointConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BugsnagEndpointConfiguration.h; path = ../Source/BugsnagEndpointConfiguration.h; sourceTree = ""; }; + E71DB9F5244763B400D0161E /* BugsnagEndpointConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagEndpointConfiguration.m; path = ../Source/BugsnagEndpointConfiguration.m; sourceTree = ""; }; + E71DB9FC24485D1C00D0161E /* BugsnagSessionTrackerStopTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BugsnagSessionTrackerStopTest.m; sourceTree = ""; }; + E71DB9FD24485D1D00D0161E /* BugsnagTestConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BugsnagTestConstants.h; sourceTree = ""; }; + E71DB9FE24485D1D00D0161E /* BugsnagClientTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BugsnagClientTests.m; sourceTree = ""; }; + E71DB9FF24485D1D00D0161E /* BugsnagTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BugsnagTests.m; sourceTree = ""; }; + E71DBA0024485D1D00D0161E /* BugsnagMetadataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BugsnagMetadataTests.m; sourceTree = ""; }; + E71DBA0124485D1D00D0161E /* BugsnagPluginTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BugsnagPluginTest.m; sourceTree = ""; }; E722105D243B6A0E0083CF15 /* BugsnagStackframeTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BugsnagStackframeTest.m; sourceTree = ""; }; E72352BF1F55924A00436528 /* BSGConnectivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSGConnectivity.h; path = ../Source/BSGConnectivity.h; sourceTree = SOURCE_ROOT; }; E72352C01F55924A00436528 /* BSGConnectivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSGConnectivity.m; path = ../Source/BSGConnectivity.m; sourceTree = SOURCE_ROOT; }; @@ -535,6 +550,7 @@ 00F9393223FC168F008C7073 /* BugsnagBaseUnitTest.m */, 8A2C8FE01C6BC38200846019 /* BugsnagBreadcrumbsTest.m */, E790C41F2432314A006FFB26 /* BugsnagClientMirrorTest.m */, + E71DB9FE24485D1D00D0161E /* BugsnagClientTests.m */, 4B406C1622CAD96400464D1D /* BugsnagCollectionsBSGDictMergeTest.m */, 4B406C1722CAD96400464D1D /* BugsnagCollectionsBSGDictSetSafeObjectTest.m */, 4B775FD222CBE02A004839C5 /* BugsnagCollectionsBSGDictInsertIfNotNilTest.m */, @@ -542,29 +558,18 @@ E7A9E56C2436365300D99F8A /* BugsnagDeviceTest.m */, 00D7ACA223E984B300FBE4A7 /* BugsnagEventTests.m */, E762E9F71F73F7E900E82B43 /* BugsnagHandledStateTest.m */, + E71DBA0024485D1D00D0161E /* BugsnagMetadataTests.m */, E7AB4B9D2423E184004F015A /* BugsnagOnBreadcrumbTest.m */, + E71DBA0124485D1D00D0161E /* BugsnagPluginTest.m */, E791482D1FD82B0C003EFEBF /* BugsnagSessionTest.m */, E791482B1FD82B0C003EFEBF /* BugsnagSessionTrackerTest.m */, + E71DB9FC24485D1C00D0161E /* BugsnagSessionTrackerStopTest.m */, E791482C1FD82B0C003EFEBF /* BugsnagSessionTrackingPayloadTest.m */, 8A2C8FE21C6BC38200846019 /* BugsnagSinkTests.m */, - 00F9393B23FD2D9B008C7073 /* BugsnagTestsDummyClass.h */, - 00F9393A23FD2D9B008C7073 /* BugsnagTestsDummyClass.m */, - E791482E1FD82B0C003EFEBF /* BugsnagUserTest.m */, - E7D2E675243B8FB6005A3041 /* BugsnagStacktraceTest.m */, - E722105D243B6A0E0083CF15 /* BugsnagStackframeTest.m */, - 00F9393B23FD2D9B008C7073 /* BugsnagTestsDummyClass.h */, - 00F9393A23FD2D9B008C7073 /* BugsnagTestsDummyClass.m */, - E7529FA1243CAE3F006B4932 /* BugsnagThreadSerializationTest.m */, - E7529F9F243CAE34006B4932 /* BugsnagThreadTest.m */, - E791482E1FD82B0C003EFEBF /* BugsnagUserTest.m */, - E791482E1FD82B0C003EFEBF /* BugsnagUserTest.m */, - 00F9393B23FD2D9B008C7073 /* BugsnagTestsDummyClass.h */, - 00F9393A23FD2D9B008C7073 /* BugsnagTestsDummyClass.m */, - E7529FA1243CAE3F006B4932 /* BugsnagThreadSerializationTest.m */, - E7529F9F243CAE34006B4932 /* BugsnagThreadTest.m */, - E791482E1FD82B0C003EFEBF /* BugsnagUserTest.m */, E7D2E675243B8FB6005A3041 /* BugsnagStacktraceTest.m */, E722105D243B6A0E0083CF15 /* BugsnagStackframeTest.m */, + E71DB9FF24485D1D00D0161E /* BugsnagTests.m */, + E71DB9FD24485D1D00D0161E /* BugsnagTestConstants.h */, 00F9393B23FD2D9B008C7073 /* BugsnagTestsDummyClass.h */, 00F9393A23FD2D9B008C7073 /* BugsnagTestsDummyClass.m */, E7529FA1243CAE3F006B4932 /* BugsnagThreadSerializationTest.m */, @@ -747,6 +752,8 @@ E72352C01F55924A00436528 /* BSGConnectivity.m */, E791483E1FD82B35003EFEBF /* BugsnagApiClient.h */, E791483D1FD82B35003EFEBF /* BugsnagApiClient.m */, + E71DB9F4244763B400D0161E /* BugsnagEndpointConfiguration.h */, + E71DB9F5244763B400D0161E /* BugsnagEndpointConfiguration.m */, E79E6AFE1F4E3847002B35F9 /* BugsnagErrorReportApiClient.h */, E79E6AFF1F4E3847002B35F9 /* BugsnagErrorReportApiClient.m */, E79148411FD82B35003EFEBF /* BugsnagSessionTrackingApiClient.h */, @@ -877,6 +884,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + E71DB9F6244763B400D0161E /* BugsnagEndpointConfiguration.h in Headers */, E790C47C24349CE2006FFB26 /* BugsnagThread.h in Headers */, E790C47A24349CE2006FFB26 /* BugsnagStackframe.h in Headers */, E790C47624349CE2006FFB26 /* BugsnagError.h in Headers */, @@ -1071,6 +1079,7 @@ 8A2C8FDE1C6BC2C800846019 /* BugsnagSink.m in Sources */, 0089B6EB2411682000D5A7F2 /* BugsnagClient.m in Sources */, E79E6BBE1F4E3850002B35F9 /* BSG_KSMach.c in Sources */, + E71DB9F7244763B400D0161E /* BugsnagEndpointConfiguration.m in Sources */, E79E6B991F4E3850002B35F9 /* BSG_KSCrashType.c in Sources */, E79E6BC01F4E3850002B35F9 /* BSG_KSMach_Arm.c in Sources */, E79E6B8F1F4E3850002B35F9 /* BSG_KSCrashDoctor.m in Sources */, @@ -1167,14 +1176,19 @@ 00F9393323FC168F008C7073 /* BugsnagBaseUnitTest.m in Sources */, E7CE78BE1FD94E77001D07E0 /* KSCrashSentry_NSException_Tests.m in Sources */, E7CE78C21FD94E77001D07E0 /* KSDynamicLinker_Tests.m in Sources */, + E71DBA0524485D1D00D0161E /* BugsnagMetadataTests.m in Sources */, + E71DBA0324485D1D00D0161E /* BugsnagClientTests.m in Sources */, E722105E243B6A0F0083CF15 /* BugsnagStackframeTest.m in Sources */, E7CE78CA1FD94E77001D07E0 /* KSString_Tests.m in Sources */, E762E9F91F73F7F300E82B43 /* BugsnagHandledStateTest.m in Sources */, + E71DBA0624485D1D00D0161E /* BugsnagPluginTest.m in Sources */, E7CE78C51FD94E77001D07E0 /* KSLogger_Tests.m in Sources */, E7CE78C11FD94E77001D07E0 /* KSCrashState_Tests.m in Sources */, E7529FA0243CAE35006B4932 /* BugsnagThreadTest.m in Sources */, E7AB4B9E2423E184004F015A /* BugsnagOnBreadcrumbTest.m in Sources */, + E71DBA0424485D1D00D0161E /* BugsnagTests.m in Sources */, E7CE78C31FD94E77001D07E0 /* KSFileUtils_Tests.m in Sources */, + E71DBA0224485D1D00D0161E /* BugsnagSessionTrackerStopTest.m in Sources */, E7CE78BC1FD94E77001D07E0 /* KSCrashReportStore_Tests.m in Sources */, E79148611FD82BB7003EFEBF /* BugsnagSessionTrackerTest.m in Sources */, E79148591FD82BAE003EFEBF /* BugsnagSessionTest.m in Sources */, diff --git a/Source/Bugsnag.h b/Source/Bugsnag.h index 6499ffa8d..220f58f8a 100644 --- a/Source/Bugsnag.h +++ b/Source/Bugsnag.h @@ -34,6 +34,7 @@ #import "BugsnagAppWithState.h" #import "BugsnagDevice.h" #import "BugsnagDeviceWithState.h" +#import "BugsnagEndpointConfiguration.h" #import "BugsnagError.h" #import "BugsnagStackframe.h" #import "BugsnagThread.h" diff --git a/Source/BugsnagConfiguration.h b/Source/BugsnagConfiguration.h index 4c1e350d9..b6867ea47 100644 --- a/Source/BugsnagConfiguration.h +++ b/Source/BugsnagConfiguration.h @@ -34,6 +34,7 @@ #import "BugsnagMetadataStore.h" @class BugsnagUser; +@class BugsnagEndpointConfiguration; /** * BugsnagConfiguration error constants @@ -198,9 +199,7 @@ typedef NS_OPTIONS(NSUInteger, BSGErrorType) { * * @throws an assertion if the notify endpoint is not a valid URL */ - -- (void)setEndpointsForNotify:(NSString *_Nonnull)notify - sessions:(NSString *_Nonnull)sessions NS_SWIFT_NAME(setEndpoints(notify:sessions:)); +@property(nonnull, nonatomic) BugsnagEndpointConfiguration *endpoints; // ============================================================================= // MARK: - User diff --git a/Source/BugsnagConfiguration.m b/Source/BugsnagConfiguration.m index 545877e40..4b2373638 100644 --- a/Source/BugsnagConfiguration.m +++ b/Source/BugsnagConfiguration.m @@ -37,6 +37,7 @@ #import "BugsnagBreadcrumbs.h" #import "BugsnagMetadataStore.h" #import "BSGSerialization.h" +#import "BugsnagEndpointConfiguration.h" static NSString *const kHeaderApiPayloadVersion = @"Bugsnag-Payload-Version"; static NSString *const kHeaderApiKey = @"Bugsnag-Api-Key"; @@ -123,8 +124,7 @@ - (nonnull id)copyWithZone:(nullable NSZone *)zone { [copy setEnabledReleaseStages:self.enabledReleaseStages]; [copy setMaxBreadcrumbs:self.maxBreadcrumbs]; [copy setMetadata: [[BugsnagMetadata alloc] initWithDictionary:[[self.metadata toDictionary] mutableCopy]]]; - [copy setEndpointsForNotify:self.notifyURL.absoluteString - sessions:self.sessionURL.absoluteString]; + [copy setEndpoints:self.endpoints]; [copy setOnBreadcrumbBlocks:[self.onBreadcrumbBlocks mutableCopy]]; [copy setOnCrashHandler:self.onCrashHandler]; [copy setOnSendBlocks:[self.onSendBlocks mutableCopy]]; @@ -183,6 +183,7 @@ - (instancetype _Nonnull)initWithApiKey:(NSString *_Nonnull)apiKey _metadata = [[BugsnagMetadata alloc] init]; _config = [[BugsnagMetadata alloc] init]; _apiKey = apiKey; + _endpoints = [BugsnagEndpointConfiguration new]; _sessionURL = [NSURL URLWithString:@"https://sessions.bugsnag.com"]; _autoDetectErrors = YES; _notifyURL = [NSURL URLWithString:BSGDefaultNotifyUrl]; @@ -324,9 +325,10 @@ - (NSDictionary *)sessionApiHeaders { }; } -- (void)setEndpointsForNotify:(NSString *_Nonnull)notify sessions:(NSString *_Nonnull)sessions { - _notifyURL = [NSURL URLWithString:notify]; - _sessionURL = [NSURL URLWithString:sessions]; +- (void)setEndpoints:(BugsnagEndpointConfiguration *)endpoints { + _endpoints = endpoints; + _notifyURL = [NSURL URLWithString:endpoints.notify]; + _sessionURL = [NSURL URLWithString:endpoints.sessions]; NSAssert([self isValidUrl:_notifyURL], @"Invalid URL supplied for notify endpoint"); diff --git a/Source/BugsnagEndpointConfiguration.h b/Source/BugsnagEndpointConfiguration.h new file mode 100644 index 000000000..3e0f26294 --- /dev/null +++ b/Source/BugsnagEndpointConfiguration.h @@ -0,0 +1,34 @@ +// +// BugsnagEndpointConfiguration.h +// Bugsnag +// +// Created by Jamie Lynch on 15/04/2020. +// Copyright © 2020 Bugsnag. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * Set the endpoints to send data to. By default we'll send error reports to + * https://notify.bugsnag.com, and sessions to https://sessions.bugsnag.com, but you can + * override this if you are using Bugsnag Enterprise to point to your own Bugsnag endpoints. + */ +@interface BugsnagEndpointConfiguration : NSObject + +/** + * Configures the endpoint to which events should be sent + */ +@property NSString *notify; + +/** + * Configures the endpoint to which sessions should be sent + */ +@property NSString *sessions; + +- (instancetype)initWithNotify:(NSString *)notify sessions:(NSString *)sessions; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Source/BugsnagEndpointConfiguration.m b/Source/BugsnagEndpointConfiguration.m new file mode 100644 index 000000000..a0300115e --- /dev/null +++ b/Source/BugsnagEndpointConfiguration.m @@ -0,0 +1,28 @@ +// +// BugsnagEndpointConfiguration.m +// Bugsnag +// +// Created by Jamie Lynch on 15/04/2020. +// Copyright © 2020 Bugsnag. All rights reserved. +// + +#import "BugsnagEndpointConfiguration.h" + +@implementation BugsnagEndpointConfiguration + +- (instancetype)init { + if (self = [super init]) { + _notify = @"https://notify.bugsnag.com"; + _sessions = @"https://sessions.bugsnag.com"; + } + return self; +} + +- (instancetype)initWithNotify:(NSString *)notify sessions:(NSString *)sessions { + if (self = [super init]) { + _notify = notify; + _sessions = sessions; + } + return self; +} +@end diff --git a/Tests/BugsnagConfigurationTests.m b/Tests/BugsnagConfigurationTests.m index af86814a9..819c78a92 100644 --- a/Tests/BugsnagConfigurationTests.m +++ b/Tests/BugsnagConfigurationTests.m @@ -72,13 +72,16 @@ - (void)testSessionEndpoints { XCTAssertEqualObjects([NSURL URLWithString:@"https://sessions.bugsnag.com"], config.sessionURL); // Test overriding the session endpoint (use dummy endpoints to avoid hitting production) - [config setEndpointsForNotify:@"http://localhost:1234" sessions:@"http://localhost:8000"]; + + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://localhost:1234" + sessions:@"http://localhost:8000"]; XCTAssertEqualObjects([NSURL URLWithString:@"http://localhost:8000"], config.sessionURL); } - (void)testSetEmptySessionsEndpoint { BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notify.example.com" sessions:@""]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notify.example.com" + sessions:@""]; BugsnagSessionTracker *sessionTracker = [[BugsnagSessionTracker alloc] initWithConfig:config postRecordCallback:nil]; @@ -89,7 +92,8 @@ - (void)testSetEmptySessionsEndpoint { - (void)testSetMalformedSessionsEndpoint { BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notify.example.com" sessions:@"f"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notify.example.com" + sessions:@"f"]; BugsnagSessionTracker *sessionTracker = [[BugsnagSessionTracker alloc] initWithConfig:config postRecordCallback:nil]; @@ -106,7 +110,8 @@ - (void)testAddOnSessionBlock { // Setup __block XCTestExpectation *expectation = [self expectationWithDescription:@"Remove On Session Block"]; BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notreal.bugsnag.com" sessions:@"http://notreal.bugsnag.com"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notreal.bugsnag.com" + sessions:@"http://notreal.bugsnag.com"]; XCTAssertEqual([[config onSessionBlocks] count], 0); BugsnagOnSessionBlock sessionBlock = ^BOOL(NSMutableDictionary * _Nonnull sessionPayload) { // We expect the session block to be called @@ -131,7 +136,8 @@ - (void)testRemoveOnSessionBlock { calledExpectation.inverted = YES; BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notreal.bugsnag.com" sessions:@"http://notreal.bugsnag.com"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notreal.bugsnag.com" + sessions:@"http://notreal.bugsnag.com"]; XCTAssertEqual([[config onSessionBlocks] count], 0); BugsnagOnSessionBlock sessionBlock = ^BOOL(NSMutableDictionary * _Nonnull sessionPayload) { [calledExpectation fulfill]; @@ -165,7 +171,8 @@ - (void)testAddOnSessionBlockThenRemove { expectation4.inverted = YES; BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notreal.bugsnag.com" sessions:@"http://notreal.bugsnag.com"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notreal.bugsnag.com" + sessions:@"http://notreal.bugsnag.com"]; XCTAssertEqual([[config onSessionBlocks] count], 0); BugsnagOnSessionBlock sessionBlock = ^BOOL(NSMutableDictionary * _Nonnull sessionPayload) { @@ -306,13 +313,15 @@ - (void)testNotifyEndpoint { XCTAssertEqualObjects([NSURL URLWithString:@"https://notify.bugsnag.com/"], config.notifyURL); // Test overriding the notify endpoint (use dummy endpoints to avoid hitting production) - [config setEndpointsForNotify:@"http://localhost:1234" sessions:@"http://localhost:8000"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://localhost:1234" + sessions:@"http://localhost:8000"]; XCTAssertEqualObjects([NSURL URLWithString:@"http://localhost:1234"], config.notifyURL); } - (void)testSetEndpoints { BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notify.example.com" sessions:@"http://sessions.example.com"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notify.example.com" + sessions:@"http://sessions.example.com"]; XCTAssertEqualObjects([NSURL URLWithString:@"http://notify.example.com"], config.notifyURL); XCTAssertEqualObjects([NSURL URLWithString:@"http://sessions.example.com"], config.sessionURL); } @@ -323,10 +332,12 @@ - (void)testSetNilNotifyEndpoint { NSString *notify = @"foo"; notify = nil; #if DEBUG - XCTAssertThrowsSpecificNamed([config setEndpointsForNotify:notify sessions:@"http://sessions.example.com"], + XCTAssertThrowsSpecificNamed([config setEndpoints:[[BugsnagEndpointConfiguration alloc] initWithNotify:notify + sessions:@"http://sessions.example.com"]], NSException, NSInternalInconsistencyException); #else - XCTAssertNoThrow([config setEndpointsForNotify:@"" sessions:@"http://sessions.example.com"]); + XCTAssertNoThrow([config setEndpoints:[[BugsnagEndpointConfiguration alloc] initWithNotify:@"" + sessions:@"http://sessions.example.com"]); #endif } @@ -334,10 +345,12 @@ - (void)testSetNilNotifyEndpoint { - (void)testSetEmptyNotifyEndpoint { BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; #if DEBUG - XCTAssertThrowsSpecificNamed([config setEndpointsForNotify:@"" sessions:@"http://sessions.example.com"], + XCTAssertThrowsSpecificNamed([config setEndpoints:[[BugsnagEndpointConfiguration alloc] initWithNotify:@"" + sessions:@"http://sessions.example.com"]], NSException, NSInternalInconsistencyException); #else - XCTAssertNoThrow([config setEndpointsForNotify:@"" sessions:@"http://sessions.example.com"]); + XCTAssertNoThrow([config setEndpoints:[[BugsnagEndpointConfiguration alloc] initWithNotify:@"" + sessions:@"http://sessions.example.com"]]); #endif } @@ -345,10 +358,12 @@ - (void)testSetEmptyNotifyEndpoint { - (void)testSetMalformedNotifyEndpoint { BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; #if DEBUG - XCTAssertThrowsSpecificNamed([config setEndpointsForNotify:@"http://" sessions:@"http://sessions.example.com"], + XCTAssertThrowsSpecificNamed([config setEndpoints:[[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://" + sessions:@"http://sessions.example.com"]], NSException, NSInternalInconsistencyException); #else - XCTAssertNoThrow([config setEndpointsForNotify:@"http://" sessions:@"http://sessions.example.com"]); + XCTAssertNoThrow([config setEndpoints:[[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://" + sessions:@"http://sessions.example.com"]]); #endif } diff --git a/Tests/BugsnagOnBreadcrumbTest.m b/Tests/BugsnagOnBreadcrumbTest.m index 394b86b76..ce88e529c 100644 --- a/Tests/BugsnagOnBreadcrumbTest.m +++ b/Tests/BugsnagOnBreadcrumbTest.m @@ -45,7 +45,8 @@ - (void)testAddOnBreadcrumbBlock { // Setup __block XCTestExpectation *expectation = [self expectationWithDescription:@"Remove On Breadcrumb Block"]; BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notreal.bugsnag.com" sessions:@"http://notreal.bugsnag.com"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notreal.bugsnag.com" + sessions:@"http://notreal.bugsnag.com"]; XCTAssertEqual([[config onBreadcrumbBlocks] count], 0); BugsnagOnBreadcrumbBlock crumbBlock = ^(BugsnagBreadcrumb * _Nonnull crumb) { // We expect the breadcrumb block to be called @@ -71,7 +72,8 @@ - (void)testRemoveOnBreadcrumbBlock { calledExpectation.inverted = YES; BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notreal.bugsnag.com" sessions:@"http://notreal.bugsnag.com"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notreal.bugsnag.com" + sessions:@"http://notreal.bugsnag.com"]; XCTAssertEqual([[config onBreadcrumbBlocks] count], 0); BugsnagOnBreadcrumbBlock crumbBlock = ^(BugsnagBreadcrumb * _Nonnull crumb) { [calledExpectation fulfill]; @@ -104,7 +106,8 @@ - (void)testAddOnBreadcrumbBlockThenRemove { expectation2.inverted = YES; BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notreal.bugsnag.com" sessions:@"http://notreal.bugsnag.com"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notreal.bugsnag.com" + sessions:@"http://notreal.bugsnag.com"]; XCTAssertEqual([[config onBreadcrumbBlocks] count], 0); BugsnagOnBreadcrumbBlock crumbBlock = ^(BugsnagBreadcrumb * _Nonnull crumb) { @@ -172,7 +175,8 @@ - (void)testRemoveNonexistentOnBreadcrumbBlocks { */ - (void)testAddOnBreadcrumbMutation { BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notreal.bugsnag.com" sessions:@"http://notreal.bugsnag.com"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notreal.bugsnag.com" + sessions:@"http://notreal.bugsnag.com"]; [config addOnBreadcrumbBlock:^(BugsnagBreadcrumb * _Nonnull crumb) { crumb.message = @"Foo"; return YES; @@ -190,7 +194,8 @@ - (void)testAddOnBreadcrumbMutation { */ - (void)testAddOnBreadcrumbRejection { BugsnagConfiguration *config = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; - [config setEndpointsForNotify:@"http://notreal.bugsnag.com" sessions:@"http://notreal.bugsnag.com"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://notreal.bugsnag.com" + sessions:@"http://notreal.bugsnag.com"]; [config addOnBreadcrumbBlock:^(BugsnagBreadcrumb * _Nonnull crumb) { return NO; }]; diff --git a/Tests/BugsnagSinkTests.m b/Tests/BugsnagSinkTests.m index b1cb2fd58..71819a648 100644 --- a/Tests/BugsnagSinkTests.m +++ b/Tests/BugsnagSinkTests.m @@ -43,7 +43,8 @@ - (void)setUp { config.releaseStage = @"MagicalTestingTime"; // set a dummy endpoint, avoid hitting production - [config setEndpointsForNotify:@"http://localhost:1234" sessions:@"http://localhost:1234"]; + config.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://localhost:1234" + sessions:@"http://localhost:1234"]; [Bugsnag startBugsnagWithConfiguration:config]; BugsnagEvent *report = [[BugsnagEvent alloc] initWithKSReport:self.rawReportData]; diff --git a/Tests/BugsnagTests.m b/Tests/BugsnagTests.m index a8811f8ec..46ac32c60 100644 --- a/Tests/BugsnagTests.m +++ b/Tests/BugsnagTests.m @@ -332,9 +332,9 @@ - (void) testOnSendBlocks { // Prevent sending events BugsnagConfiguration *configuration = [[BugsnagConfiguration alloc] initWithApiKey:DUMMY_APIKEY_32CHAR_1]; // We'll not be able to use the onSend -> false route to fail calls to notify() - [configuration setEndpointsForNotify:@"http://not.valid.bugsnag/not/an/endpoint" - sessions:@"http://not.valid.bugsnag/not/an/endpoint"]; - + configuration.endpoints = [[BugsnagEndpointConfiguration alloc] initWithNotify:@"http://not.valid.bugsnag/not/an/endpoint" + sessions:@"http://not.valid.bugsnag/not/an/endpoint"]; + // Ensure there's nothing from another test XCTAssertEqual([[configuration onSendBlocks] count], 0); diff --git a/features/fixtures/ios-swift-cocoapods/iOSTestApp/AppDelegate.swift b/features/fixtures/ios-swift-cocoapods/iOSTestApp/AppDelegate.swift index f3e0662a0..8d625d3a1 100644 --- a/features/fixtures/ios-swift-cocoapods/iOSTestApp/AppDelegate.swift +++ b/features/fixtures/ios-swift-cocoapods/iOSTestApp/AppDelegate.swift @@ -52,7 +52,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // also that extra reports aren't erroneously sent in other conditions // when OOM reporting is enabled config.enabledErrorTypes.insert(.OOMs) - config.setEndpoints(notify: mockAPIPath, sessions: mockAPIPath) + config.endpoints = BugsnagEndpointConfiguration(notify: mockAPIPath, sessions: mockAPIPath) return config } diff --git a/iOS/Bugsnag.xcodeproj/project.pbxproj b/iOS/Bugsnag.xcodeproj/project.pbxproj index 1a7369c06..5227d6996 100644 --- a/iOS/Bugsnag.xcodeproj/project.pbxproj +++ b/iOS/Bugsnag.xcodeproj/project.pbxproj @@ -148,6 +148,10 @@ E7107C851F4C97F100BB3F98 /* BSG_RFC3339DateTool.m in Sources */ = {isa = PBXBuildFile; fileRef = E7107C191F4C97F100BB3F98 /* BSG_RFC3339DateTool.m */; }; E7107C861F4C97F100BB3F98 /* BSG_KSCrashReportFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E7107C1C1F4C97F100BB3F98 /* BSG_KSCrashReportFilter.h */; }; E7107C871F4C97F100BB3F98 /* BSG_KSCrashReportFilterCompletion.h in Headers */ = {isa = PBXBuildFile; fileRef = E7107C1D1F4C97F100BB3F98 /* BSG_KSCrashReportFilterCompletion.h */; }; + E71DB9F02447635F00D0161E /* BugsnagEndpointConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = E71DB9EE2447635F00D0161E /* BugsnagEndpointConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E71DB9F12447635F00D0161E /* BugsnagEndpointConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DB9EF2447635F00D0161E /* BugsnagEndpointConfiguration.m */; }; + E71DB9F22447635F00D0161E /* BugsnagEndpointConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DB9EF2447635F00D0161E /* BugsnagEndpointConfiguration.m */; }; + E71DB9F32447638200D0161E /* BugsnagEndpointConfiguration.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = E71DB9EE2447635F00D0161E /* BugsnagEndpointConfiguration.h */; }; E71FF7591FD55CE50099C9DD /* BugsnagApiClient.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F42950F4A741305B77E95389 /* BugsnagApiClient.h */; }; E722105C243B69F00083CF15 /* BugsnagStackframeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E722105B243B69F00083CF15 /* BugsnagStackframeTest.m */; }; E72352B61F55718E00436528 /* BSGConnectivity.h in Headers */ = {isa = PBXBuildFile; fileRef = E72352B41F55718E00436528 /* BSGConnectivity.h */; }; @@ -392,6 +396,7 @@ dstPath = "include/${PRODUCT_NAME}"; dstSubfolderSpec = 16; files = ( + E71DB9F32447638200D0161E /* BugsnagEndpointConfiguration.h in CopyFiles */, E7529F94243C8EF2006B4932 /* RegisterErrorData.h in CopyFiles */, E7D2E66E243B8F62005A3041 /* BugsnagStacktrace.h in CopyFiles */, E790C45B24349A70006FFB26 /* BugsnagApp.h in CopyFiles */, @@ -632,6 +637,8 @@ E7107C191F4C97F100BB3F98 /* BSG_RFC3339DateTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSG_RFC3339DateTool.m; path = ../Source/KSCrash/Source/KSCrash/Recording/Tools/BSG_RFC3339DateTool.m; sourceTree = SOURCE_ROOT; }; E7107C1C1F4C97F100BB3F98 /* BSG_KSCrashReportFilter.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; name = BSG_KSCrashReportFilter.h; path = ../Source/KSCrash/Source/KSCrash/Reporting/Filters/BSG_KSCrashReportFilter.h; sourceTree = SOURCE_ROOT; }; E7107C1D1F4C97F100BB3F98 /* BSG_KSCrashReportFilterCompletion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSG_KSCrashReportFilterCompletion.h; path = ../Source/KSCrash/Source/KSCrash/Reporting/Filters/BSG_KSCrashReportFilterCompletion.h; sourceTree = SOURCE_ROOT; }; + E71DB9EE2447635F00D0161E /* BugsnagEndpointConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BugsnagEndpointConfiguration.h; path = ../Source/BugsnagEndpointConfiguration.h; sourceTree = ""; }; + E71DB9EF2447635F00D0161E /* BugsnagEndpointConfiguration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BugsnagEndpointConfiguration.m; path = ../Source/BugsnagEndpointConfiguration.m; sourceTree = ""; }; E722105B243B69F00083CF15 /* BugsnagStackframeTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BugsnagStackframeTest.m; path = ../../Tests/BugsnagStackframeTest.m; sourceTree = ""; }; E72352B41F55718E00436528 /* BSGConnectivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSGConnectivity.h; path = ../Source/BSGConnectivity.h; sourceTree = SOURCE_ROOT; }; E72352B51F55718E00436528 /* BSGConnectivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSGConnectivity.m; path = ../Source/BSGConnectivity.m; sourceTree = SOURCE_ROOT; }; @@ -702,8 +709,6 @@ E7D2E669243B8F48005A3041 /* BugsnagStacktrace.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BugsnagStacktrace.h; path = ../Source/BugsnagStacktrace.h; sourceTree = ""; }; E7D2E66A243B8F48005A3041 /* BugsnagStacktrace.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BugsnagStacktrace.m; path = ../Source/BugsnagStacktrace.m; sourceTree = ""; }; E7D2E66F243B8F8D005A3041 /* BugsnagStacktraceTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BugsnagStacktraceTest.m; path = ../../Tests/BugsnagStacktraceTest.m; sourceTree = ""; }; - E7EB06721FCDAF2000C076A6 /* BugsnagKSCrashSysInfoParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BugsnagKSCrashSysInfoParser.h; path = ../Source/BugsnagKSCrashSysInfoParser.h; sourceTree = ""; }; - E7EB06731FCDAF2000C076A6 /* BugsnagKSCrashSysInfoParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BugsnagKSCrashSysInfoParser.m; path = ../Source/BugsnagKSCrashSysInfoParser.m; sourceTree = ""; }; E7EC040C1F4CC6A000C2E9D5 /* libc++.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.1.dylib"; path = "../../../../../usr/lib/libc++.1.dylib"; sourceTree = ""; }; E7EC040D1F4CC6A000C2E9D5 /* libz.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.1.dylib; path = ../../../../../usr/lib/libz.1.dylib; sourceTree = ""; }; E7EC04101F4CC82800C2E9D5 /* libstdc++.6.0.9.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.6.0.9.dylib"; path = "../../../../../usr/lib/libstdc++.6.0.9.dylib"; sourceTree = ""; }; @@ -882,7 +887,6 @@ 00F9393823FC4F64008C7073 /* BugsnagTestsDummyClass.m */, E7529F9B243CAE02006B4932 /* BugsnagThreadSerializationTest.m */, E7529F9D243CAE0D006B4932 /* BugsnagThreadTest.m */, - F429551527EAE3AFE1F605FE /* BugsnagThreadTest.m */, E78C1EFD1FCC778700B976D3 /* BugsnagUserTest.m */, F42954B7D892334E7551F0F3 /* RegisterErrorDataTest.m */, 000E6E9C23D8690E009D8194 /* Tests-Bridging-Header.h */, @@ -1160,10 +1164,10 @@ E72352B51F55718E00436528 /* BSGConnectivity.m */, F42950F4A741305B77E95389 /* BugsnagApiClient.h */, F4295E2778677786239F2B28 /* BugsnagApiClient.m */, + E71DB9EE2447635F00D0161E /* BugsnagEndpointConfiguration.h */, + E71DB9EF2447635F00D0161E /* BugsnagEndpointConfiguration.m */, E72962D21F4BBA8B00CEA15D /* BugsnagErrorReportApiClient.h */, E72962D31F4BBA8B00CEA15D /* BugsnagErrorReportApiClient.m */, - 8A2C8F4D1C6BBE3C00846019 /* BugsnagSink.h */, - 8A2C8F4E1C6BBE3C00846019 /* BugsnagSink.m */, ); name = Delivery; sourceTree = ""; @@ -1186,6 +1190,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + E71DB9F02447635F00D0161E /* BugsnagEndpointConfiguration.h in Headers */, E790C45824349A28006FFB26 /* BugsnagThread.h in Headers */, E790C453243498BB006FFB26 /* BugsnagStackframe.h in Headers */, E790C44E24349898006FFB26 /* BugsnagError.h in Headers */, @@ -1418,6 +1423,7 @@ E7107C551F4C97F100BB3F98 /* BSG_KSCrashSentry_Signal.c in Sources */, 8A2C8F501C6BBE3C00846019 /* Bugsnag.m in Sources */, E7107C691F4C97F100BB3F98 /* BSG_KSMach.c in Sources */, + E71DB9F12447635F00D0161E /* BugsnagEndpointConfiguration.m in Sources */, E7107C441F4C97F100BB3F98 /* BSG_KSCrashType.c in Sources */, E7107C6B1F4C97F100BB3F98 /* BSG_KSMach_Arm.c in Sources */, 8A2C8F5E1C6BBE3C00846019 /* BugsnagClient.m in Sources */, @@ -1592,6 +1598,7 @@ E7397E271F83BC2A0034242A /* BSGConnectivity.m in Sources */, E7397E281F83BC2A0034242A /* BSGSerialization.m in Sources */, E72BF7811FC86A7A004BE82F /* BugsnagUser.m in Sources */, + E71DB9F22447635F00D0161E /* BugsnagEndpointConfiguration.m in Sources */, E7397E291F83BC2A0034242A /* Bugsnag.m in Sources */, E790C45A24349A28006FFB26 /* BugsnagThread.m in Sources */, E7397E2A1F83BC2A0034242A /* BugsnagBreadcrumb.m in Sources */, diff --git a/tvOS/Bugsnag.xcodeproj/project.pbxproj b/tvOS/Bugsnag.xcodeproj/project.pbxproj index d762d14c6..9e2da2ba6 100644 --- a/tvOS/Bugsnag.xcodeproj/project.pbxproj +++ b/tvOS/Bugsnag.xcodeproj/project.pbxproj @@ -53,6 +53,14 @@ 8AD9A5041D42EEB0004E1CC5 /* BugsnagSink.m in Sources */ = {isa = PBXBuildFile; fileRef = 8AB151351D41366400C9B218 /* BugsnagSink.m */; }; 8AD9A5051D42EEE9004E1CC5 /* BSG_KSCrashReportWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AB151251D41366400C9B218 /* BSG_KSCrashReportWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8AD9FA8D1E0863A1002859A7 /* BugsnagConfigurationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8AD9FA8B1E0863A1002859A7 /* BugsnagConfigurationTests.m */; }; + E71DB9FA244763DB00D0161E /* BugsnagEndpointConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DB9F8244763DB00D0161E /* BugsnagEndpointConfiguration.m */; }; + E71DB9FB244763DB00D0161E /* BugsnagEndpointConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = E71DB9F9244763DB00D0161E /* BugsnagEndpointConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E71DBA0D24485D8500D0161E /* BugsnagSessionTrackerStopTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DBA0724485D8400D0161E /* BugsnagSessionTrackerStopTest.m */; }; + E71DBA0E24485D8500D0161E /* BSGConnectivityTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DBA0824485D8400D0161E /* BSGConnectivityTest.m */; }; + E71DBA0F24485D8500D0161E /* BugsnagTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DBA0924485D8400D0161E /* BugsnagTests.m */; }; + E71DBA1024485D8500D0161E /* BugsnagClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DBA0A24485D8500D0161E /* BugsnagClientTests.m */; }; + E71DBA1124485D8500D0161E /* BugsnagMetadataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DBA0B24485D8500D0161E /* BugsnagMetadataTests.m */; }; + E71DBA1224485D8500D0161E /* BugsnagPluginTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E71DBA0C24485D8500D0161E /* BugsnagPluginTest.m */; }; E7221060243B6A220083CF15 /* BugsnagStackframeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E722105F243B6A220083CF15 /* BugsnagStackframeTest.m */; }; E72352BA1F55922F00436528 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E72352B91F55922F00436528 /* SystemConfiguration.framework */; }; E72352BD1F55923700436528 /* BSGConnectivity.h in Headers */ = {isa = PBXBuildFile; fileRef = E72352BB1F55923700436528 /* BSGConnectivity.h */; }; @@ -275,6 +283,14 @@ 8AB151341D41366400C9B218 /* BugsnagSink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BugsnagSink.h; path = ../Source/BugsnagSink.h; sourceTree = ""; }; 8AB151351D41366400C9B218 /* BugsnagSink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagSink.m; path = ../Source/BugsnagSink.m; sourceTree = ""; }; 8AD9FA8B1E0863A1002859A7 /* BugsnagConfigurationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagConfigurationTests.m; path = ../Tests/BugsnagConfigurationTests.m; sourceTree = SOURCE_ROOT; }; + E71DB9F8244763DB00D0161E /* BugsnagEndpointConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagEndpointConfiguration.m; path = ../Source/BugsnagEndpointConfiguration.m; sourceTree = ""; }; + E71DB9F9244763DB00D0161E /* BugsnagEndpointConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BugsnagEndpointConfiguration.h; path = ../Source/BugsnagEndpointConfiguration.h; sourceTree = ""; }; + E71DBA0724485D8400D0161E /* BugsnagSessionTrackerStopTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagSessionTrackerStopTest.m; path = ../../Tests/BugsnagSessionTrackerStopTest.m; sourceTree = ""; }; + E71DBA0824485D8400D0161E /* BSGConnectivityTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSGConnectivityTest.m; path = ../../Tests/BSGConnectivityTest.m; sourceTree = ""; }; + E71DBA0924485D8400D0161E /* BugsnagTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagTests.m; path = ../../Tests/BugsnagTests.m; sourceTree = ""; }; + E71DBA0A24485D8500D0161E /* BugsnagClientTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagClientTests.m; path = ../../Tests/BugsnagClientTests.m; sourceTree = ""; }; + E71DBA0B24485D8500D0161E /* BugsnagMetadataTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagMetadataTests.m; path = ../../Tests/BugsnagMetadataTests.m; sourceTree = ""; }; + E71DBA0C24485D8500D0161E /* BugsnagPluginTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagPluginTest.m; path = ../../Tests/BugsnagPluginTest.m; sourceTree = ""; }; E722105F243B6A220083CF15 /* BugsnagStackframeTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BugsnagStackframeTest.m; path = ../../Tests/BugsnagStackframeTest.m; sourceTree = ""; }; E72352B91F55922F00436528 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; E72352BB1F55923700436528 /* BSGConnectivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSGConnectivity.h; path = ../Source/BSGConnectivity.h; sourceTree = ""; }; @@ -506,8 +522,6 @@ 8A6C6FAB2257882400E8EF24 /* BSGOutOfMemoryWatchdog.m */, 8A627CD31EC3B69300F7C04E /* BSGSerialization.h */, 8A627CD41EC3B69300F7C04E /* BSGSerialization.m */, - E7D2E679243B8FD2005A3041 /* BugsnagStacktrace.h */, - E7D2E67A243B8FD2005A3041 /* BugsnagStacktrace.m */, 8AB1512A1D41366400C9B218 /* BugsnagCollections.h */, 8AB1512B1D41366400C9B218 /* BugsnagCollections.m */, 8AB1512C1D41366400C9B218 /* BugsnagConfiguration.h */, @@ -535,6 +549,7 @@ isa = PBXGroup; children = ( E7CE78D71FD94EF1001D07E0 /* KSCrash */, + E71DBA0824485D8400D0161E /* BSGConnectivityTest.m */, 4B3CD2B722C5676700DBFF33 /* BSGOutOfMemoryWatchdogTests.m */, E790C4A02434CB5B006FFB26 /* BugsnagAppTest.m */, E7A9E56E2436366800D99F8A /* BugsnagDeviceTest.m */, @@ -542,6 +557,7 @@ 00F9393523FC16DA008C7073 /* BugsnagBaseUnitTest.m */, 8AB1511D1D41361700C9B218 /* BugsnagBreadcrumbsTest.m */, E790C421243231EA006FFB26 /* BugsnagClientMirrorTest.m */, + E71DBA0A24485D8500D0161E /* BugsnagClientTests.m */, 4B406C1322CAD94100464D1D /* BugsnagCollectionsBSGDictMergeTest.m */, 4B406C1222CAD94100464D1D /* BugsnagCollectionsBSGDictSetSafeObjectTest.m */, 4B775FD022CBE01F004839C5 /* BugsnagCollectionsBSGDictInsertIfNotNilTest.m */, @@ -549,17 +565,18 @@ 00D7ACA623E98A5D00FBE4A7 /* BugsnagEventTests.m */, 00D7ACA923E98A9A00FBE4A7 /* BugsnagEventFromKSCrashReportTest.m */, E762E9EE1F73F6CF00E82B43 /* BugsnagHandledStateTest.m */, + E71DBA0B24485D8500D0161E /* BugsnagMetadataTests.m */, E77526C6242E694C0077A42F /* BugsnagOnBreadcrumbTest.m */, + E71DBA0C24485D8500D0161E /* BugsnagPluginTest.m */, E791488C1FD82E77003EFEBF /* BugsnagSessionTest.m */, + E71DBA0724485D8400D0161E /* BugsnagSessionTrackerStopTest.m */, E791488A1FD82E77003EFEBF /* BugsnagSessionTrackerTest.m */, E791488B1FD82E77003EFEBF /* BugsnagSessionTrackingPayloadTest.m */, 8AB1511F1D41361700C9B218 /* BugsnagSinkTests.m */, 00D7ACA523E98A5D00FBE4A7 /* BugsnagTestConstants.h */, + E71DBA0924485D8400D0161E /* BugsnagTests.m */, E722105F243B6A220083CF15 /* BugsnagStackframeTest.m */, E7D2E677243B8FC8005A3041 /* BugsnagStacktraceTest.m */, - E722105F243B6A220083CF15 /* BugsnagStackframeTest.m */, - E7D2E677243B8FC8005A3041 /* BugsnagStacktraceTest.m */, - E791488D1FD82E77003EFEBF /* BugsnagUserTest.m */, 00F9393D23FD2DDB008C7073 /* BugsnagTestsDummyClass.h */, 00F9393E23FD2DDB008C7073 /* BugsnagTestsDummyClass.m */, 4B3CD2B922C5676700DBFF33 /* BugsnagThreadTest.m */, @@ -647,6 +664,8 @@ E72352BC1F55923700436528 /* BSGConnectivity.m */, E791486F1FD82E6C003EFEBF /* BugsnagApiClient.h */, E791486E1FD82E6B003EFEBF /* BugsnagApiClient.m */, + E71DB9F9244763DB00D0161E /* BugsnagEndpointConfiguration.h */, + E71DB9F8244763DB00D0161E /* BugsnagEndpointConfiguration.m */, E76616F31F4E45950094CECF /* BugsnagErrorReportApiClient.h */, E76616F41F4E45950094CECF /* BugsnagErrorReportApiClient.m */, E79148721FD82E6C003EFEBF /* BugsnagSessionTrackingApiClient.h */, @@ -875,6 +894,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + E71DB9FB244763DB00D0161E /* BugsnagEndpointConfiguration.h in Headers */, E790C49224349D35006FFB26 /* BugsnagThread.h in Headers */, E790C49324349D35006FFB26 /* BugsnagStackframe.h in Headers */, E790C48D24349D35006FFB26 /* BugsnagError.h in Headers */, @@ -1069,6 +1089,7 @@ E766179F1F4E459C0094CECF /* BSG_KSCrashSentry_Signal.c in Sources */, 0089B6F0241168CC00D5A7F2 /* BugsnagClient.m in Sources */, E79148881FD82E6D003EFEBF /* BugsnagSession.m in Sources */, + E71DB9FA244763DB00D0161E /* BugsnagEndpointConfiguration.m in Sources */, E791487C1FD82E6D003EFEBF /* BugsnagSessionTrackingApiClient.m in Sources */, E76617B31F4E459C0094CECF /* BSG_KSMach.c in Sources */, E790C49924349D35006FFB26 /* BugsnagAppWithState.m in Sources */, @@ -1140,25 +1161,31 @@ E7529FA6243CAE6A006B4932 /* BugsnagThreadSerializationTest.m in Sources */, 4B3CD2BD22C5676800DBFF33 /* BugsnagThreadTest.m in Sources */, 00D7ACA723E98A5D00FBE4A7 /* BugsnagEventTests.m in Sources */, + E71DBA1224485D8500D0161E /* BugsnagPluginTest.m in Sources */, E7CE78F21FD94F1B001D07E0 /* KSMach_Tests.m in Sources */, E7CE79071FD94F1B001D07E0 /* KSSysCtl_Tests.m in Sources */, E7CE78F71FD94F1B001D07E0 /* KSCrashSentry_Signal_Tests.m in Sources */, E790C422243231EA006FFB26 /* BugsnagClientMirrorTest.m in Sources */, E7CE78FE1FD94F1B001D07E0 /* KSSignalInfo_Tests.m in Sources */, 00D7ACAB23E98A9A00FBE4A7 /* BugsnagEventFromKSCrashReportTest.m in Sources */, + E71DBA1024485D8500D0161E /* BugsnagClientTests.m in Sources */, E7CE78FC1FD94F1B001D07E0 /* KSCrashSentry_NSException_Tests.m in Sources */, 4B406C1522CAD94100464D1D /* BugsnagCollectionsBSGDictMergeTest.m in Sources */, E7CE79081FD94F1B001D07E0 /* KSLogger_Tests.m in Sources */, + E71DBA0E24485D8500D0161E /* BSGConnectivityTest.m in Sources */, E7D2E678243B8FC8005A3041 /* BugsnagStacktraceTest.m in Sources */, E7221060243B6A220083CF15 /* BugsnagStackframeTest.m in Sources */, E7CE78F31FD94F1B001D07E0 /* NSError+SimpleConstructor_Tests.m in Sources */, + E71DBA0F24485D8500D0161E /* BugsnagTests.m in Sources */, 4B775FD122CBE01F004839C5 /* BugsnagCollectionsBSGDictInsertIfNotNilTest.m in Sources */, E7A9E56F2436366800D99F8A /* BugsnagDeviceTest.m in Sources */, E7CE79001FD94F1B001D07E0 /* KSJSONCodec_Tests.m in Sources */, + E71DBA1124485D8500D0161E /* BugsnagMetadataTests.m in Sources */, E7CE79051FD94F1B001D07E0 /* KSDynamicLinker_Tests.m in Sources */, E7CE78F61FD94F1B001D07E0 /* FileBasedTestCase.m in Sources */, E7CE79031FD94F1B001D07E0 /* KSCrashReportConverter_Tests.m in Sources */, E79148911FD82E77003EFEBF /* BugsnagUserTest.m in Sources */, + E71DBA0D24485D8500D0161E /* BugsnagSessionTrackerStopTest.m in Sources */, E791488E1FD82E77003EFEBF /* BugsnagSessionTrackerTest.m in Sources */, E79148901FD82E77003EFEBF /* BugsnagSessionTest.m in Sources */, 8AB151211D41361700C9B218 /* BugsnagBreadcrumbsTest.m in Sources */,