diff --git a/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme b/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme index d3309741d2..88f6c3484b 100644 --- a/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme +++ b/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme @@ -82,9 +82,6 @@ - - diff --git a/Sources/Sentry/include/SentrySystemEventBreadcrumbs.h b/Sources/Sentry/include/SentrySystemEventBreadcrumbs.h index 2392279359..57d079848e 100644 --- a/Sources/Sentry/include/SentrySystemEventBreadcrumbs.h +++ b/Sources/Sentry/include/SentrySystemEventBreadcrumbs.h @@ -16,6 +16,7 @@ SENTRY_NO_INIT #if TARGET_OS_IOS - (void)start:(UIDevice *)currentDevice; +- (void)timezoneEventTriggered; #endif - (void)stop; diff --git a/Tests/SentryTests/Integrations/Breadcrumbs/SentrySystemEventBreadcrumbsTest.swift b/Tests/SentryTests/Integrations/Breadcrumbs/SentrySystemEventBreadcrumbsTest.swift index 6d21fd2950..5b6108cd81 100644 --- a/Tests/SentryTests/Integrations/Breadcrumbs/SentrySystemEventBreadcrumbsTest.swift +++ b/Tests/SentryTests/Integrations/Breadcrumbs/SentrySystemEventBreadcrumbsTest.swift @@ -252,13 +252,14 @@ class SentrySystemEventBreadcrumbsTest: XCTestCase { } } - func testTimezoneChangeNotificationBreadcrumb_disabled() { + func testTimezoneChangeNotificationBreadcrumb() { let scope = Scope() sut = fixture.getSut(scope: scope, currentDevice: nil) fixture.currentDateProvider.timezoneOffsetValue = 7_200 - NotificationCenter.default.post(Notification(name: NSNotification.Name.NSSystemTimeZoneDidChange)) + sut.timezoneEventTriggered() + assertBreadcrumbAction(scope: scope, action: "TIMEZONE_CHANGE") { data in XCTAssertEqual(data["previous_seconds_from_gmt"] as? Int, 0) XCTAssertEqual(data["current_seconds_from_gmt"] as? Int, 7_200)