diff --git a/.jazzy.yaml b/.jazzy.yaml index 8950788c3..6153b83c7 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -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.12.0/Bugsnag" +github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.12.1/Bugsnag" github_url: "https://github.com/bugsnag/bugsnag-cocoa" hide_documentation_coverage: true module: "Bugsnag" -module_version: "6.12.0" +module_version: "6.12.1" objc: true output: "docs" readme: "README.md" diff --git a/Bugsnag.podspec.json b/Bugsnag.podspec.json index 2361bd619..8e4d117df 100644 --- a/Bugsnag.podspec.json +++ b/Bugsnag.podspec.json @@ -1,6 +1,6 @@ { "name": "Bugsnag", - "version": "6.12.0", + "version": "6.12.1", "summary": "The Bugsnag crash reporting framework for Apple platforms.", "homepage": "https://bugsnag.com", "license": "MIT", @@ -9,7 +9,7 @@ }, "source": { "git": "https://github.com/bugsnag/bugsnag-cocoa.git", - "tag": "v6.12.0" + "tag": "v6.12.1" }, "frameworks": [ "Foundation", diff --git a/Bugsnag.xcodeproj/project.pbxproj b/Bugsnag.xcodeproj/project.pbxproj index 967e8242a..eabdfe77c 100644 --- a/Bugsnag.xcodeproj/project.pbxproj +++ b/Bugsnag.xcodeproj/project.pbxproj @@ -1325,7 +1325,6 @@ 01847D952644140F00ADA4C7 /* BSGInternalErrorReporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSGInternalErrorReporter.m; sourceTree = ""; }; 01847DAB26441A5E00ADA4C7 /* BSGInternalErrorReporterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BSGInternalErrorReporterTests.m; sourceTree = ""; }; 01937CF9257A7B4C00F2DE31 /* Bugsnag+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bugsnag+Private.h"; sourceTree = ""; }; - 01937D09257A7ED000F2DE31 /* BugsnagSessionTracker+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagSessionTracker+Private.h"; sourceTree = ""; }; 01937D11257A814D00F2DE31 /* BugsnagMetadata+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagMetadata+Private.h"; sourceTree = ""; }; 01937D2E257A83A900F2DE31 /* BugsnagApp+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BugsnagApp+Private.h"; sourceTree = ""; }; 019480C42625EE9800E833ED /* BSGAppKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BSGAppKit.h; sourceTree = ""; }; @@ -1688,7 +1687,6 @@ 01CCAEFF25D4151C0057268D /* BugsnagLastRunInfo+Private.h */, 00AD1EF82486A17700A27979 /* BugsnagSessionTracker.h */, 00AD1F012486A17900A27979 /* BugsnagSessionTracker.m */, - 01937D09257A7ED000F2DE31 /* BugsnagSessionTracker+Private.h */, CBB0928B2519F891007698BC /* BugsnagSystemState.h */, CBB0928A2519F891007698BC /* BugsnagSystemState.m */, 00AD1CF124869EBD00A27979 /* Breadcrumbs */, diff --git a/Bugsnag/BugsnagSessionTracker+Private.h b/Bugsnag/BugsnagSessionTracker+Private.h deleted file mode 100644 index 2d0572b00..000000000 --- a/Bugsnag/BugsnagSessionTracker+Private.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// BugsnagSessionTracker+Private.h -// Bugsnag -// -// Created by Nick Dowell on 04/12/2020. -// Copyright © 2020 Bugsnag Inc. All rights reserved. -// - -#import "BugsnagSessionTracker.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface BugsnagSessionTracker () - -#pragma mark Properties - -@property (copy, nonatomic) NSString *codeBundleId; - -@property (nullable, nonatomic) BugsnagSession *currentSession; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Bugsnag/BugsnagSessionTracker.h b/Bugsnag/BugsnagSessionTracker.h index 7db46889a..a6e7523a5 100644 --- a/Bugsnag/BugsnagSessionTracker.h +++ b/Bugsnag/BugsnagSessionTracker.h @@ -11,9 +11,11 @@ #import "BugsnagSession.h" #import "BugsnagConfiguration.h" +NS_ASSUME_NONNULL_BEGIN + @class BugsnagSessionTrackingApiClient; -typedef void (^SessionTrackerCallback)(BugsnagSession *newSession); +typedef void (^SessionTrackerCallback)(BugsnagSession *_Nullable newSession); extern NSString *const BSGSessionUpdateNotification; @@ -27,8 +29,10 @@ extern NSString *const BSGSessionUpdateNotification; @return A new session tracker */ - (instancetype)initWithConfig:(BugsnagConfiguration *)config - client:(BugsnagClient *)client - postRecordCallback:(void(^)(BugsnagSession *))callback; + client:(nullable BugsnagClient *)client + postRecordCallback:(nullable void(^)(BugsnagSession *))callback; + +- (void)startWithNotificationCenter:(NSNotificationCenter *)notificationCenter isInForeground:(BOOL)isInForeground; /** Record and send a new session @@ -77,12 +81,18 @@ extern NSString *const BSGSessionUpdateNotification; */ - (void)incrementEventCountUnhandled:(BOOL)unhandled; +@property (copy, nonatomic) NSString *codeBundleId; + +@property (nullable, nonatomic) BugsnagSession *currentSession; + /** * Retrieves the running session, or nil if the session is stopped or has not yet been started/resumed. */ -@property (nonatomic, strong, readonly) BugsnagSession *runningSession; +@property (nullable, readonly, nonatomic) BugsnagSession *runningSession; - (void)addRuntimeVersionInfo:(NSString *)info withKey:(NSString *)key; @end + +NS_ASSUME_NONNULL_END diff --git a/Bugsnag/BugsnagSessionTracker.m b/Bugsnag/BugsnagSessionTracker.m index a2edb7037..7015709c3 100644 --- a/Bugsnag/BugsnagSessionTracker.m +++ b/Bugsnag/BugsnagSessionTracker.m @@ -6,7 +6,7 @@ // Copyright © 2017 Bugsnag. All rights reserved. // -#import "BugsnagSessionTracker+Private.h" +#import "BugsnagSessionTracker.h" #import "BSG_KSSystemInfo.h" #import "BugsnagApp+Private.h" @@ -21,6 +21,12 @@ #import "BugsnagSessionTrackingPayload.h" #import "BSGFileLocations.h" +#if TARGET_OS_IOS || TARGET_OS_TV +#import "BSGUIKit.h" +#elif TARGET_OS_OSX +#import "BSGAppKit.h" +#endif + /** Number of seconds in background required to make a new session */ @@ -60,6 +66,49 @@ - (instancetype)initWithConfig:(BugsnagConfiguration *)config return self; } +- (void)startWithNotificationCenter:(NSNotificationCenter *)notificationCenter isInForeground:(BOOL)isInForeground { + if (isInForeground) { + [self startNewSessionIfAutoCaptureEnabled]; + } else { + bsg_log_debug(@"Not starting session because app is not in the foreground"); + } + +#if TARGET_OS_IOS || TARGET_OS_TV + + [notificationCenter addObserver:self + selector:@selector(handleAppForegroundEvent) + name:UIApplicationWillEnterForegroundNotification + object:nil]; + + [notificationCenter addObserver:self + selector:@selector(handleAppForegroundEvent) + name:UIApplicationDidBecomeActiveNotification + object:nil]; + + [notificationCenter addObserver:self + selector:@selector(handleAppBackgroundEvent) + name:UIApplicationDidEnterBackgroundNotification + object:nil]; + +#elif TARGET_OS_OSX + + [notificationCenter addObserver:self + selector:@selector(handleAppForegroundEvent) + name:NSApplicationWillBecomeActiveNotification + object:nil]; + + [notificationCenter addObserver:self + selector:@selector(handleAppForegroundEvent) + name:NSApplicationDidBecomeActiveNotification + object:nil]; + + [notificationCenter addObserver:self + selector:@selector(handleAppBackgroundEvent) + name:NSApplicationDidResignActiveNotification + object:nil]; +#endif +} + - (void)setCodeBundleId:(NSString *)codeBundleId { _codeBundleId = codeBundleId; self.apiClient.codeBundleId = codeBundleId; diff --git a/Bugsnag/Client/BugsnagClient+Private.h b/Bugsnag/Client/BugsnagClient+Private.h index 553e31acc..4a3a8ac6d 100644 --- a/Bugsnag/Client/BugsnagClient+Private.h +++ b/Bugsnag/Client/BugsnagClient+Private.h @@ -68,7 +68,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, nonatomic) NSDictionary *metadataFromLastLaunch; -@property (strong, nonatomic) BugsnagNotifier *notifier; // Used in BugsnagReactNative +@property (readonly, nonatomic) BugsnagNotifier *notifier; // Used in BugsnagReactNative @property (strong, nonatomic) BugsnagPluginClient *pluginClient; diff --git a/Bugsnag/Client/BugsnagClient.m b/Bugsnag/Client/BugsnagClient.m index f764ebe6e..9e9e20a84 100644 --- a/Bugsnag/Client/BugsnagClient.m +++ b/Bugsnag/Client/BugsnagClient.m @@ -65,7 +65,7 @@ #import "BugsnagNotifier.h" #import "BugsnagPluginClient.h" #import "BugsnagSession+Private.h" -#import "BugsnagSessionTracker+Private.h" +#import "BugsnagSessionTracker.h" #import "BugsnagSessionTrackingApiClient.h" #import "BugsnagStackframe+Private.h" #import "BugsnagStateEvent.h" @@ -208,7 +208,7 @@ - (instancetype)initWithConfiguration:(BugsnagConfiguration *)configuration { BSGKeyApp: @{BSGKeyIsLaunching: @YES}, BSGKeyClient: BSGDictionaryWithKeyAndObject(BSGKeyContext, _configuration.context) }]; - self.notifier = [BugsnagNotifier new]; + _notifier = configuration.notifier ?: [[BugsnagNotifier alloc] init]; self.systemState = [[BugsnagSystemState alloc] initWithConfiguration:configuration]; BSGFileLocations *fileLocations = [BSGFileLocations current]; @@ -313,7 +313,6 @@ - (void)start { [self.notificationBreadcrumbs start]; NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - [self watchLifecycleEvents:center]; #if BSG_PLATFORM_IOS [center addObserver:self @@ -349,13 +348,18 @@ - (void)start { object:nil]; } + [center addObserver:self + selector:@selector(applicationWillTerminate:) +#if BSG_PLATFORM_IOS || BSG_PLATFORM_TVOS + name:UIApplicationWillTerminateNotification +#elif BSG_PLATFORM_OSX + name:NSApplicationWillTerminateNotification +#endif + object:nil]; + self.started = YES; - if (bsg_kscrashstate_currentState()->applicationIsInForeground) { - [self.sessionTracker startNewSessionIfAutoCaptureEnabled]; - } else { - bsg_log_debug(@"Not starting session because app is not in the foreground"); - } + [self.sessionTracker startWithNotificationCenter:center isInForeground:bsg_kscrashstate_currentState()->applicationIsInForeground]; // Record a "Bugsnag Loaded" message [self addAutoBreadcrumbOfType:BSGBreadcrumbTypeState withMessage:@"Bugsnag loaded" andMetadata:nil]; @@ -486,6 +490,7 @@ - (void)setCodeBundleId:(NSString *)codeBundleId { * Removes observers and listeners to prevent allocations when the app is terminated */ - (void)applicationWillTerminate:(__unused NSNotification *)notification { + [[NSNotificationCenter defaultCenter] removeObserver:self.sessionTracker]; [[NSNotificationCenter defaultCenter] removeObserver:self]; [BSGConnectivity stopMonitoring]; @@ -495,45 +500,6 @@ - (void)applicationWillTerminate:(__unused NSNotification *)notification { #endif } -- (void)watchLifecycleEvents:(NSNotificationCenter *)center { - NSNotificationName foregroundName; - NSNotificationName backgroundName; - NSNotificationName terminateName; - - #if BSG_PLATFORM_IOS || BSG_PLATFORM_TVOS - foregroundName = UIApplicationWillEnterForegroundNotification; - backgroundName = UIApplicationDidEnterBackgroundNotification; - terminateName = UIApplicationWillTerminateNotification; - #elif BSG_PLATFORM_OSX - foregroundName = NSApplicationWillBecomeActiveNotification; - backgroundName = NSApplicationDidResignActiveNotification; - terminateName = NSApplicationWillTerminateNotification; - #endif - - [center addObserver:self - selector:@selector(applicationWillEnterForeground:) - name:foregroundName - object:nil]; - - [center addObserver:self - selector:@selector(applicationWillEnterBackground:) - name:backgroundName - object:nil]; - - [center addObserver:self - selector:@selector(applicationWillTerminate:) - name:terminateName - object:nil]; -} - -- (void)applicationWillEnterForeground:(__unused NSNotification *)notification { - [self.sessionTracker handleAppForegroundEvent]; -} - -- (void)applicationWillEnterBackground:(__unused NSNotification *)notification { - [self.sessionTracker handleAppBackgroundEvent]; -} - - (void)thermalStateDidChange:(NSNotification *)notification API_AVAILABLE(ios(11.0), tvos(11.0)) { NSProcessInfo *processInfo = notification.object; @@ -556,6 +522,10 @@ - (void)thermalStateDidChange:(NSNotification *)notification API_AVAILABLE(ios(1 self.lastThermalState = processInfo.thermalState; } +// ============================================================================= +// MARK: - Session Tracking +// ============================================================================= + - (void)startSession { [self.sessionTracker startNewSession]; } @@ -568,6 +538,10 @@ - (BOOL)resumeSession { return [self.sessionTracker resumeSession]; } +// ============================================================================= +// MARK: - Connectivity Listener +// ============================================================================= + /** * Monitor the Bugsnag endpoint to detect changes in connectivity, * flush pending events when (re)connected and report connectivity diff --git a/Bugsnag/Configuration/BugsnagConfiguration+Private.h b/Bugsnag/Configuration/BugsnagConfiguration+Private.h index 6158e07e5..d92a96691 100644 --- a/Bugsnag/Configuration/BugsnagConfiguration+Private.h +++ b/Bugsnag/Configuration/BugsnagConfiguration+Private.h @@ -8,6 +8,8 @@ #import +@class BugsnagNotifier; + NS_ASSUME_NONNULL_BEGIN @interface BugsnagConfiguration () @@ -25,6 +27,8 @@ NS_ASSUME_NONNULL_BEGIN @property (copy, nonatomic) BugsnagMetadata *metadata; +@property (nullable, nonatomic) BugsnagNotifier *notifier; + @property (readonly, nullable, nonatomic) NSURL *notifyURL; @property (nonatomic) NSMutableArray *onBreadcrumbBlocks; diff --git a/Bugsnag/Payload/BugsnagNotifier.h b/Bugsnag/Payload/BugsnagNotifier.h index 0076c9250..ad9b785f6 100644 --- a/Bugsnag/Payload/BugsnagNotifier.h +++ b/Bugsnag/Payload/BugsnagNotifier.h @@ -12,10 +12,18 @@ NS_ASSUME_NONNULL_BEGIN @interface BugsnagNotifier : NSObject +/// Initializes the object with details of the Cocoa notifier. +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithName:(NSString *)name + version:(NSString *)version + url:(NSString *)url + dependencies:(NSArray *)dependencies NS_DESIGNATED_INITIALIZER; + @property (copy, nonatomic) NSString *name; @property (copy, nonatomic) NSString *version; @property (copy, nonatomic) NSString *url; -@property (nonatomic) NSMutableArray *dependencies; +@property (copy, nonatomic) NSArray *dependencies; - (NSDictionary *)toDict; diff --git a/Bugsnag/Payload/BugsnagNotifier.m b/Bugsnag/Payload/BugsnagNotifier.m index 6d622b0c7..284ed9a75 100644 --- a/Bugsnag/Payload/BugsnagNotifier.m +++ b/Bugsnag/Payload/BugsnagNotifier.m @@ -15,17 +15,30 @@ @implementation BugsnagNotifier - (instancetype)init { if ((self = [super init])) { #if BSG_PLATFORM_TVOS - self.name = @"tvOS Bugsnag Notifier"; + _name = @"tvOS Bugsnag Notifier"; #elif BSG_PLATFORM_IOS - self.name = @"iOS Bugsnag Notifier"; + _name = @"iOS Bugsnag Notifier"; #elif BSG_PLATFORM_OSX - self.name = @"OSX Bugsnag Notifier"; + _name = @"OSX Bugsnag Notifier"; #else - self.name = @"Bugsnag Objective-C"; + _name = @"Bugsnag Objective-C"; #endif - self.version = @"6.12.0"; - self.url = @"https://github.com/bugsnag/bugsnag-cocoa"; - self.dependencies = [NSMutableArray new]; + _version = @"6.12.1"; + _url = @"https://github.com/bugsnag/bugsnag-cocoa"; + _dependencies = @[]; + } + return self; +} + +- (instancetype)initWithName:(NSString *)name + version:(NSString *)version + url:(NSString *)url + dependencies:(NSArray *)dependencies { + if ((self = [super init])) { + _name = [name copy]; + _version = [version copy]; + _url = [url copy]; + _dependencies = [dependencies copy]; } return self; } diff --git a/CHANGELOG.md b/CHANGELOG.md index be2a07015..6868c724f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changelog ========= +## 6.12.1 (2021-09-15) + +### Bug fixes + +* Fix a regression where the session was not captured at launch if Bugsnag was started before + `willFinishLaunchingWithOptions` in iOS apps that do not adopt the UIScene life-cycle. + [#1180](https://github.com/bugsnag/bugsnag-cocoa/pull/1180) + ## 6.12.0 (2021-09-01) ### Enhancements diff --git a/Framework/Info.plist b/Framework/Info.plist index b6bed7e40..4621b72c8 100644 --- a/Framework/Info.plist +++ b/Framework/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 6.12.0 + 6.12.1 CFBundleVersion 1 diff --git a/Makefile b/Makefile index 570ea68ed..f75dd8352 100644 --- a/Makefile +++ b/Makefile @@ -168,7 +168,7 @@ endif @echo $(VERSION) > VERSION @sed -i '' "s/\"version\": .*,/\"version\": \"$(VERSION)\",/" Bugsnag.podspec.json @sed -i '' "s/\"tag\": .*/\"tag\": \"v$(VERSION)\"/" Bugsnag.podspec.json - @sed -i '' "s/self.version = .*;/self.version = @\"$(VERSION)\";/" Bugsnag/Payload/BugsnagNotifier.m + @sed -i '' "s/_version = @\".*\";/_version = @\"$(VERSION)\";/" Bugsnag/Payload/BugsnagNotifier.m @sed -i '' "s/## TBD/## $(VERSION) ($(shell date '+%Y-%m-%d'))/" CHANGELOG.md @sed -i '' -E "s/[0-9]+.[0-9]+.[0-9]+/$(VERSION)/g" .jazzy.yaml @agvtool new-marketing-version $(VERSION) diff --git a/Tests/BugsnagClientMirrorTest.m b/Tests/BugsnagClientMirrorTest.m index f024e8a14..7c1969300 100644 --- a/Tests/BugsnagClientMirrorTest.m +++ b/Tests/BugsnagClientMirrorTest.m @@ -43,8 +43,6 @@ - (void)setUp { @"appendNSErrorInfo:block:event: B40@0:8@16@?24@32", @"appendNSErrorInfo:block:event: c40@0:8@16@?24@32", @"applicationDidReceiveMemoryWarning: v24@0:8@16", - @"applicationWillEnterBackground: v24@0:8@16", - @"applicationWillEnterForeground: v24@0:8@16", @"applicationWillTerminate: v24@0:8@16", @"autoNotify B16@0:8", @"autoNotify c16@0:8", @@ -139,8 +137,6 @@ - (void)setUp { @"setupConnectivityListener v16@0:8", @"start v16@0:8", @"startAppHangDetector v16@0:8", - @"startListeningForStateChangeNotification: v24@0:8@16", - @"startListeningForWorkspaceStateChangeNotifications: v24@0:8@16", @"started B16@0:8", @"started c16@0:8", @"state @16@0:8", @@ -152,7 +148,6 @@ - (void)setUp { @"unsubscribeFromNotifications: v24@0:8@16", @"updateAutomaticBreadcrumbDetectionSettings v16@0:8", @"updateCrashDetectionSettings v16@0:8", - @"watchLifecycleEvents: v24@0:8@16", @"workspaceBreadcrumbStateEvents @16@0:8", ]]; diff --git a/Tests/BugsnagNotifierTest.m b/Tests/BugsnagNotifierTest.m index 7e0c4f241..a89435ce1 100644 --- a/Tests/BugsnagNotifierTest.m +++ b/Tests/BugsnagNotifierTest.m @@ -43,7 +43,7 @@ - (void)testDependencySerialization { dep.name = @"COBOL Notifier"; dep.version = @"1.0.0"; dep.url = @"https://github.com/bugsnag/bugsnag-cobol"; - [self.notifier.dependencies addObject:dep]; + self.notifier.dependencies = @[dep]; NSDictionary *dict = [self.notifier toDict]; XCTAssertEqualObjects(@"https://github.com/bugsnag/bugsnag-cocoa", dict[@"url"]); diff --git a/Tests/BugsnagSessionTrackerTest.m b/Tests/BugsnagSessionTrackerTest.m index 678c44b8c..597666976 100644 --- a/Tests/BugsnagSessionTrackerTest.m +++ b/Tests/BugsnagSessionTrackerTest.m @@ -11,7 +11,7 @@ #import "BugsnagUser.h" #import "BugsnagConfiguration+Private.h" #import "BugsnagSession+Private.h" -#import "BugsnagSessionTracker+Private.h" +#import "BugsnagSessionTracker.h" #import "BugsnagSessionTrackingApiClient.h" #import "BugsnagTestConstants.h" @@ -153,5 +153,29 @@ - (void)testOnSendBlockTrue { XCTAssertNotNil(self.sessionTracker.currentSession); } +- (void)testHandleAppForegroundEvent { + [self.sessionTracker handleAppForegroundEvent]; + XCTAssertNotNil(self.sessionTracker.runningSession, @"There should be a running session after calling handleAppForegroundEvent"); + + NSString *sessionId = [self.sessionTracker.runningSession.id copy]; + [self.sessionTracker handleAppForegroundEvent]; + XCTAssertEqualObjects(self.sessionTracker.runningSession.id, sessionId, @"A new session should not be started if previous session did not end"); +} + +- (void)testStartInBackground { + [self.sessionTracker startWithNotificationCenter:NSNotificationCenter.defaultCenter isInForeground:NO]; + XCTAssertNil(self.sessionTracker.runningSession, @"There should be no running session after starting tracker in background"); +#if TARGET_OS_IOS || TARGET_OS_TV + [NSNotificationCenter.defaultCenter postNotificationName:UIApplicationDidBecomeActiveNotification object:nil]; +#elif TARGET_OS_OSX + [NSNotificationCenter.defaultCenter postNotificationName:NSApplicationDidBecomeActiveNotification object:nil]; +#endif + XCTAssertNotNil(self.sessionTracker.runningSession, @"There should be a running session after receiving didBecomeActiveNotification"); +} + +- (void)testStartInForeground { + [self.sessionTracker startWithNotificationCenter:NSNotificationCenter.defaultCenter isInForeground:YES]; + XCTAssertNotNil(self.sessionTracker.runningSession, @"There should be a running session after starting tracker in foreground"); +} @end diff --git a/Tests/Info.plist b/Tests/Info.plist index 69801496a..caffcc7e5 100644 --- a/Tests/Info.plist +++ b/Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 6.12.0 + 6.12.1 CFBundleVersion 1 diff --git a/VERSION b/VERSION index d4e6cb429..ff61e1868 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.12.0 +6.12.1 diff --git a/features/crashprobe.feature b/features/crashprobe.feature index d1b905606..bb67412fa 100644 --- a/features/crashprobe.feature +++ b/features/crashprobe.feature @@ -67,8 +67,7 @@ Feature: Reporting crash events Scenario: Stack overflow When I run "StackOverflowScenario" - # Present to allow the scenario to crash - And I wait for 3 seconds + And the app is not running And I relaunch the app And I configure Bugsnag for "StackOverflowScenario" And I wait to receive an error