From a90f228495fe1fb34dc52c765aaae99339f444b3 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Wed, 30 Oct 2024 11:21:52 +0100 Subject: [PATCH 1/7] Fix: Time-of-check time-of-use filesystem race condition (#4473) * Fix code scanning alert no. 6: Time-of-check time-of-use filesystem race condition Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update CHANGELOG.md * Apply suggestions from code review * Format code --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Sentry Github Bot --- CHANGELOG.md | 1 + .../Recording/Tools/SentryCrashFileUtils.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e01234fb5d5..37fbe72d004 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Add option to report uncaught NSExceptions on macOS (#4471) - Build visionOS project with static Sentry SDK (#4462) +- Time-of-check time-of-use filesystem race condition (#4473) - Capture all touches with session replay (#4477) ### Improvements diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashFileUtils.c b/Sources/SentryCrash/Recording/Tools/SentryCrashFileUtils.c index 09e583ad45b..9d548fd9efe 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashFileUtils.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashFileUtils.c @@ -236,18 +236,18 @@ sentrycrashfu_readEntireFile(const char *const path, char **data, int *length, i int fd = -1; int bytesToRead = maxLength; - struct stat st; - if (stat(path, &st) < 0) { - SENTRY_ASYNC_SAFE_LOG_ERROR("Could not stat %s: %s", path, strerror(errno)); - goto done; - } - fd = open(path, O_RDONLY); if (fd < 0) { SENTRY_ASYNC_SAFE_LOG_ERROR("Could not open %s: %s", path, strerror(errno)); goto done; } + struct stat st; + if (fstat(fd, &st) < 0) { + SENTRY_ASYNC_SAFE_LOG_ERROR("Could not fstat %s: %s", path, strerror(errno)); + goto done; + } + if (bytesToRead == 0 || bytesToRead >= (int)st.st_size) { bytesToRead = (int)st.st_size; } else if (bytesToRead > 0) { From e92acb32b8eb9cd227ebd9694180efa47ff3aa03 Mon Sep 17 00:00:00 2001 From: Dhiogo Brustolin Date: Thu, 31 Oct 2024 08:45:40 +0100 Subject: [PATCH 2/7] fix: Too many navigation breadcrumbs for Session Replay (#4480) * fix: Too many navigation breadcrumbs for Session Replay * Update CHANGELOG.md --- CHANGELOG.md | 1 + Sentry.xcodeproj/project.pbxproj | 4 +++ SentryTestUtils/BreadcrumbExtension.swift | 20 +++++++++++ .../SessionReplay/SentrySessionReplay.swift | 22 +++++++++--- .../SentrySessionReplayTests.swift | 34 +++++++++++++++++++ 5 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 SentryTestUtils/BreadcrumbExtension.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index 37fbe72d004..e1cffb2d9ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Add option to report uncaught NSExceptions on macOS (#4471) - Build visionOS project with static Sentry SDK (#4462) +- Too many navigation breadcrumbs for Session Replay (#4480) - Time-of-check time-of-use filesystem race condition (#4473) - Capture all touches with session replay (#4477) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index fa43407d63b..a1e3c062796 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -936,6 +936,7 @@ D8F6A24B2885515C00320515 /* SentryPredicateDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = D8F6A24A2885515B00320515 /* SentryPredicateDescriptor.h */; }; D8F6A24E288553A800320515 /* SentryPredicateDescriptorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F6A24C2885534E00320515 /* SentryPredicateDescriptorTests.swift */; }; D8F8F5572B835BC600AC5465 /* SentryMsgPackSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F8F5562B835BC600AC5465 /* SentryMsgPackSerializerTests.m */; }; + D8FC98AB2CD0DAB30009824C /* BreadcrumbExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8FC98AA2CD0DAAC0009824C /* BreadcrumbExtension.swift */; }; D8FFE50C2703DBB400607131 /* SwizzlingCallTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8FFE50B2703DAAE00607131 /* SwizzlingCallTests.swift */; }; /* End PBXBuildFile section */ @@ -2024,6 +2025,7 @@ D8F6A24A2885515B00320515 /* SentryPredicateDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryPredicateDescriptor.h; path = include/SentryPredicateDescriptor.h; sourceTree = ""; }; D8F6A24C2885534E00320515 /* SentryPredicateDescriptorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryPredicateDescriptorTests.swift; sourceTree = ""; }; D8F8F5562B835BC600AC5465 /* SentryMsgPackSerializerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryMsgPackSerializerTests.m; sourceTree = ""; }; + D8FC98AA2CD0DAAC0009824C /* BreadcrumbExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BreadcrumbExtension.swift; sourceTree = ""; }; D8FFE50B2703DAAE00607131 /* SwizzlingCallTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwizzlingCallTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -3469,6 +3471,7 @@ isa = PBXGroup; children = ( 84AEB4682C2F9673007E46E1 /* ArrayAccesses.swift */, + D8FC98AA2CD0DAAC0009824C /* BreadcrumbExtension.swift */, 841325DE2BFED0510029228F /* TestFramesTracker.swift */, 841325C42BF49EC40029228F /* SentryLaunchProfiling+Tests.h */, 7B4C817124D1BC2B0076ACE4 /* SentryFileManager+Test.h */, @@ -5153,6 +5156,7 @@ 84AC61DB29F7654A009EEF61 /* TestDispatchSourceWrapper.swift in Sources */, 8431F01729B2851500D8DC56 /* TestSentrySystemWrapper.swift in Sources */, 84281C632A579D0700EE88F2 /* SentryProfilerMocks.mm in Sources */, + D8FC98AB2CD0DAB30009824C /* BreadcrumbExtension.swift in Sources */, 84B7FA4129B28CD200AD93B1 /* TestSentryDispatchQueueWrapper.swift in Sources */, 84B7FA3E29B28ADD00AD93B1 /* TestClient.swift in Sources */, ); diff --git a/SentryTestUtils/BreadcrumbExtension.swift b/SentryTestUtils/BreadcrumbExtension.swift new file mode 100644 index 00000000000..b1ca374c576 --- /dev/null +++ b/SentryTestUtils/BreadcrumbExtension.swift @@ -0,0 +1,20 @@ +import Sentry +public extension Breadcrumb { + static func navigation(screen: String, date: Date? = nil) -> Breadcrumb { + let result = Breadcrumb(level: .info, category: "navigation") + + result.type = "navigation" + result.timestamp = date + result.data = ["screen": screen] + + return result + } + + static func custom(date: Date? = nil) -> Breadcrumb { + let result = Breadcrumb(level: .info, category: "custom") + + result.timestamp = date + + return result + } +} diff --git a/Sources/Swift/Integrations/SessionReplay/SentrySessionReplay.swift b/Sources/Swift/Integrations/SessionReplay/SentrySessionReplay.swift index c9784545332..f3d23e82312 100644 --- a/Sources/Swift/Integrations/SessionReplay/SentrySessionReplay.swift +++ b/Sources/Swift/Integrations/SessionReplay/SentrySessionReplay.swift @@ -269,13 +269,25 @@ class SentrySessionReplay: NSObject { SentryLog.debug("Could not delete replay segment from disk: \(error.localizedDescription)") } } - + private func convertBreadcrumbs(breadcrumbs: [Breadcrumb], from: Date, until: Date) -> [any SentryRRWebEventProtocol] { - return breadcrumbs.filter { - guard let time = $0.timestamp, time >= from && time < until else { return false } - return true + var filteredResult: [Breadcrumb] = [] + var lastNavigationTime: Date = from.addingTimeInterval(-1) + + for breadcrumb in breadcrumbs { + guard let time = breadcrumb.timestamp, time >= from && time < until else { continue } + + // If it's a "navigation" breadcrumb, check the timestamp difference from the previous breadcrumb. + // Skip any breadcrumbs that have occurred within 50ms of the last one, + // as these represent child view controllers that don’t need their own navigation breadcrumb. + if breadcrumb.type == "navigation" { + if time.timeIntervalSince(lastNavigationTime) < 0.05 { continue } + lastNavigationTime = time + } + filteredResult.append(breadcrumb) } - .compactMap(breadcrumbConverter.convert(from:)) + + return filteredResult.compactMap(breadcrumbConverter.convert(from:)) } private func takeScreenshot() { diff --git a/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayTests.swift b/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayTests.swift index e3a68b5e590..5a7a4833ba9 100644 --- a/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayTests.swift +++ b/Tests/SentryTests/Integrations/SessionReplay/SentrySessionReplayTests.swift @@ -327,6 +327,40 @@ class SentrySessionReplayTests: XCTestCase { XCTAssertNil(fixture.screenshotProvider.lastImageCall) } + func testFilterCloseNavigationBreadcrumbs() { + let fixture = Fixture() + + let sut = fixture.getSut(options: SentryReplayOptions(sessionSampleRate: 1, onErrorSampleRate: 1)) + sut.start(rootView: fixture.rootView, fullSession: true) + XCTAssertEqual(fixture.lastReplayId, sut.sessionReplayId) + + fixture.dateProvider.advance(by: 1) + let startEvent = fixture.dateProvider.date() + + fixture.breadcrumbs = [ + .navigation(screen: "Some Screen", date: startEvent.addingTimeInterval(0.1)), // This should not filter out + .custom(date: startEvent.addingTimeInterval(0.11)), // This should not filter out + .navigation(screen: "Child VC 1", date: startEvent.addingTimeInterval(0.11)), // Dont keep this one + .navigation(screen: "Child VC 2", date: startEvent.addingTimeInterval(0.12)), // Dont keep this one + .navigation(screen: "Child VC 3", date: startEvent.addingTimeInterval(0.15)), // Dont keep this one + .navigation(screen: "Another Screen", date: startEvent.addingTimeInterval(0.16)) // This should not filter out + ] + + Dynamic(sut).newFrame(nil) + fixture.dateProvider.advance(by: 5) + Dynamic(sut).newFrame(nil) + + let event = Event(error: NSError(domain: "Some error", code: 1)) + sut.captureReplayFor(event: event) + + let breadCrumbRREvents = fixture.lastReplayRecording?.events.compactMap( { $0 as? SentryRRWebBreadcrumbEvent }) ?? [] + + XCTAssertEqual(breadCrumbRREvents.count, 3) + XCTAssertEqual((breadCrumbRREvents[0].data?["payload"] as? [String: Any])?["message"] as? String, "Some Screen") + XCTAssertEqual((breadCrumbRREvents[1].data?["payload"] as? [String: Any])?["category"] as? String, "custom") + XCTAssertEqual((breadCrumbRREvents[2].data?["payload"] as? [String: Any])?["message"] as? String, "Another Screen") + } + func testCaptureAllTouches() { let fixture = Fixture() let touchTracker = TestTouchTracker(dateProvider: fixture.dateProvider, scale: 1) From 7cddee1878aa2b22edc3dbd5a473f84070eb7f6f Mon Sep 17 00:00:00 2001 From: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:15:38 +0100 Subject: [PATCH 3/7] internal(hybrid): Add Replay Mask options to dict init (#4492) --- CHANGELOG.md | 1 + .../SessionReplay/SentryReplayOptions.swift | 6 + .../SentryReplayOptionsTests.swift | 152 +++++++++++++++++- 3 files changed, 158 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1cffb2d9ee..5d3afb0b3ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Improve frames tracker performance (#4469) - Log a warning when dropping envelopes due to rate-limiting (#4463) - Expose `SentrySessionReplayIntegration-Hybrid.h` as `private` (#4486) +- Add `maskedViewClasses` and `unmaskedViewClasses` to SentryReplayOptions init via dict (#4492) ## 8.39.0 diff --git a/Sources/Swift/Integrations/SessionReplay/SentryReplayOptions.swift b/Sources/Swift/Integrations/SessionReplay/SentryReplayOptions.swift index a29b3a050b2..5b7352a2b39 100644 --- a/Sources/Swift/Integrations/SessionReplay/SentryReplayOptions.swift +++ b/Sources/Swift/Integrations/SessionReplay/SentryReplayOptions.swift @@ -152,5 +152,11 @@ public class SentryReplayOptions: NSObject, SentryRedactOptions { let maskAllText = (dictionary["maskAllText"] as? NSNumber)?.boolValue ?? true let maskAllImages = (dictionary["maskAllImages"] as? NSNumber)?.boolValue ?? true self.init(sessionSampleRate: sessionSampleRate, onErrorSampleRate: onErrorSampleRate, maskAllText: maskAllText, maskAllImages: maskAllImages) + self.maskedViewClasses = ((dictionary["maskedViewClasses"] as? NSArray) ?? []).compactMap({ element in + NSClassFromString((element as? String) ?? "") + }) + self.unmaskedViewClasses = ((dictionary["unmaskedViewClasses"] as? NSArray) ?? []).compactMap({ element in + NSClassFromString((element as? String) ?? "") + }) } } diff --git a/Tests/SentryTests/Integrations/SessionReplay/SentryReplayOptionsTests.swift b/Tests/SentryTests/Integrations/SessionReplay/SentryReplayOptionsTests.swift index 98575ddecd1..0af07610afb 100644 --- a/Tests/SentryTests/Integrations/SessionReplay/SentryReplayOptionsTests.swift +++ b/Tests/SentryTests/Integrations/SessionReplay/SentryReplayOptionsTests.swift @@ -27,5 +27,155 @@ class SentryReplayOptionsTests: XCTestCase { XCTAssertEqual(options.replayBitRate, 60_000) XCTAssertEqual(options.sizeScale, 1.0) } - + + func testInitFromDictOnErrorSampleRateAsDouble() { + let options = SentryReplayOptions(dictionary: [ + "errorSampleRate": 0.44 + ]) + + XCTAssertEqual(options.onErrorSampleRate, 0.44) + } + + func testInitFromDictOnErrorSampleRateMissing() { + let options = SentryReplayOptions(dictionary: [:]) + + XCTAssertEqual(options.onErrorSampleRate, 0) + } + + func testInitFromDictOnErrorSampleRateAsString() { + let options = SentryReplayOptions(dictionary: [ + "onErrorSampleRate": "0.44" + ]) + + XCTAssertEqual(options.onErrorSampleRate, 0) + } + + func testInitFromDictSessionSampleRateAsDouble() { + let options = SentryReplayOptions(dictionary: [ + "sessionSampleRate": 0.44 + ]) + + XCTAssertEqual(options.sessionSampleRate, 0.44) + } + + func testInitFromDictSessionSampleRateMissing() { + let options = SentryReplayOptions(dictionary: [:]) + + XCTAssertEqual(options.sessionSampleRate, 0) + } + + func testInitFromDictSessionSampleRateAsString() { + let options = SentryReplayOptions(dictionary: [ + "sessionSampleRate": "0.44" + ]) + + XCTAssertEqual(options.sessionSampleRate, 0) + } + + func testInitFromDictMaskedViewClasses() { + let options = SentryReplayOptions(dictionary: [ + "maskedViewClasses": ["NSString"] + ]) + + XCTAssertEqual(options.maskedViewClasses.count, 1) + XCTAssertEqual(ObjectIdentifier(options.maskedViewClasses.first!), ObjectIdentifier(NSString.self)) + } + + func testInitFromDictMaskedViewClassesAsString() { + let options = SentryReplayOptions(dictionary: [ + "maskedViewClasses": "ExampleView1" + ]) + + XCTAssertEqual(options.maskedViewClasses.count, 0) + } + + func testInitFromDictMaskedViewClassesWithNumber() { + let options = SentryReplayOptions(dictionary: [ + "maskedViewClasses": [123] + ]) + + XCTAssertEqual(options.maskedViewClasses.count, 0) + } + + func testInitFromDictUnmaskedViewClasses() { + let options = SentryReplayOptions(dictionary: [ + "unmaskedViewClasses": ["NSString"] + ]) + + XCTAssertEqual(options.unmaskedViewClasses.count, 1) + XCTAssertEqual(ObjectIdentifier(options.unmaskedViewClasses.first!), ObjectIdentifier(NSString.self)) + } + + func testInitFromDictUnmaskedViewClassesAsString() { + let options = SentryReplayOptions(dictionary: [ + "unmaskedViewClasses": "invalid_value" + ]) + + XCTAssertEqual(options.unmaskedViewClasses.count, 0) + } + + func testInitFromDictUnmaskedViewClassesWithInvalidValues() { + let options = SentryReplayOptions(dictionary: [ + "unmaskedViewClasses": [123, "not.class"] as [Any] + ]) + + XCTAssertEqual(options.unmaskedViewClasses.count, 0) + } + + func testInitFromDictMaskAllTextWithBool() { + let options = SentryReplayOptions(dictionary: [ + "maskAllText": true + ]) + XCTAssertTrue(options.maskAllText) + + let options2 = SentryReplayOptions(dictionary: [ + "maskAllText": false + ]) + XCTAssertFalse(options2.maskAllText) + } + + func testInitFromDictMaskAllTextWithString() { + let options = SentryReplayOptions(dictionary: [ + "maskAllText": "invalid_value" + ]) + XCTAssertTrue(options.maskAllText) + } + + func testInitFromDictMaskAllImagesWithBool() { + let options = SentryReplayOptions(dictionary: [ + "maskAllImages": true + ]) + XCTAssertTrue(options.maskAllImages) + + let options2 = SentryReplayOptions(dictionary: [ + "maskAllImages": false + ]) + XCTAssertFalse(options2.maskAllImages) + } + + func testInitFromDictMaskAllImagesWithString() { + let options = SentryReplayOptions(dictionary: [ + "maskAllImages": "invalid_value" + ]) + XCTAssertTrue(options.maskAllImages) + } + + func testInitFromDictWithMultipleOptions() { + let options = SentryReplayOptions(dictionary: [ + "sessionSampleRate": 0.5, + "errorSampleRate": 0.8, + "maskAllText": false, + "maskedViewClasses": ["NSString", "not.a.class", 123] as [Any], + "unmaskedViewClasses": ["NSNumber", "invalid", true] as [Any] + ]) + + XCTAssertEqual(options.sessionSampleRate, 0.5) + XCTAssertEqual(options.onErrorSampleRate, 0.8) + XCTAssertFalse(options.maskAllText) + XCTAssertTrue(options.maskAllImages) + XCTAssertEqual(options.maskedViewClasses.count, 1) + XCTAssertEqual(ObjectIdentifier(options.maskedViewClasses.first!), ObjectIdentifier(NSString.self)) + XCTAssertEqual(options.unmaskedViewClasses.count, 1) + XCTAssertEqual(ObjectIdentifier(options.unmaskedViewClasses.first!), ObjectIdentifier(NSNumber.self)) + } } From ee2823c312e9029a3ce4e24a2ba64dfa4ef2ab9f Mon Sep 17 00:00:00 2001 From: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:15:52 +0100 Subject: [PATCH 4/7] fix(scheme): Set SentryTests to Test config by default (#4491) --- Sentry.xcodeproj/xcshareddata/xcschemes/SentryTests.xcscheme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sentry.xcodeproj/xcshareddata/xcschemes/SentryTests.xcscheme b/Sentry.xcodeproj/xcshareddata/xcschemes/SentryTests.xcscheme index d504877374e..52b04c2e68b 100644 --- a/Sentry.xcodeproj/xcshareddata/xcschemes/SentryTests.xcscheme +++ b/Sentry.xcodeproj/xcshareddata/xcschemes/SentryTests.xcscheme @@ -7,7 +7,7 @@ buildImplicitDependencies = "YES"> From 05a424a1d61e11202e8ced1aaea9f2ccaec3e813 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:16:09 +0100 Subject: [PATCH 5/7] chore(changelog): Remove trailing whitespaces (#4493) --- CHANGELOG.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d3afb0b3ee..aa0de50f17c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -392,7 +392,7 @@ to receive SIGTERM events, set the option `enableSigtermReporting = true`. ### Features -The following two features, disabled by default, were mistakenly added to the release. We usually only add features in minor releases. +The following two features, disabled by default, were mistakenly added to the release. We usually only add features in minor releases. - Add option to use own NSURLSession for transport (#3811) - Support sending GraphQL operation names in HTTP breadcrumbs (#3931) @@ -413,9 +413,9 @@ The following two features, disabled by default, were mistakenly added to the re - Remove not needed lock for logging (#3934) - Session replay Improvements (#3877) - - Use image average color and text font color to redact session replay + - Use image average color and text font color to redact session replay - Removed iOS 16 restriction from session replay - - Performance improvement + - Performance improvement ## 8.25.0 @@ -427,7 +427,7 @@ The following two features, disabled by default, were mistakenly added to the re ### Fixes - Crash due to a background call to -[UIApplication applicationState] (#3855) -- Save framework without UIKit/AppKit as Github Asset for releases (#3858) +- Save framework without UIKit/AppKit as Github Asset for releases (#3858) - Fix crash associated with runtime collision in global C function names (#3862) - Remove wrong error log in SentryCoreDataTracker (#3894) - Don't transmit device boot time in envelopes enriched with crash data (#3912, #3916) @@ -446,7 +446,7 @@ The following two features, disabled by default, were mistakenly added to the re ### Fixes - Crash due to a background call to -[UIApplication applicationState] (#3855) -- Save framework without UIKit/AppKit as Github Asset for releases (#3858) +- Save framework without UIKit/AppKit as Github Asset for releases (#3858) - Fix crash associated with runtime collision in global C function names (#3862) - Remove wrong error log in SentryCoreDataTracker (#3894) @@ -505,7 +505,7 @@ more about how to use the Metrics API. ## 8.22.1 -### Fixes +### Fixes - Checksum error when resolving the SDK via SPM (#3760) @@ -582,7 +582,7 @@ information retrieved via `NSFileSystemFreeSize` and `NSFileSystemSize` off a de - Add visionOS as device family (#3548) - Add VisionOS Support for Carthage (#3565) -### Fixes +### Fixes - Move header reference out of "extern C" (#3538) - Clarify FramesTracker log message (#3570) @@ -631,7 +631,7 @@ information retrieved via `NSFileSystemFreeSize` and `NSFileSystemSize` off a de ## 8.17.1 -### Fixes +### Fixes - Crash when UINavigationController doesn't have rootViewController (#3455) - Crash when synchronizing invalid JSON breadcrumbs to SentryWatchdogTermination (#3458) @@ -643,7 +643,7 @@ information retrieved via `NSFileSystemFreeSize` and `NSFileSystemSize` off a de ### Features -- SwiftUI support is no longer in Beta (#3441) +- SwiftUI support is no longer in Beta (#3441) ## 8.16.1 @@ -803,7 +803,7 @@ and [MXCPUExceptionDiagnostic](https://developer.apple.com/documentation/metrick ## 8.9.4 ### Fixes - + - Remove linker settings from Package.swift (#3188) - Free memory returned by backtrace_symbols() in debug builds ([#3202](https://github.com/getsentry/sentry-cocoa/pull/3202)) @@ -930,7 +930,7 @@ For the Swift error above Sentry displays: [Customized error descriptions](https://docs.sentry.io/platforms/apple/usage/#customizing-error-descriptions) have precedence over this feature. This change has no impact on grouping of the issues in Sentry. -### Fixes +### Fixes - Propagate span when copying scope (#2952) - Remove "/" from crash report file name (#3005) @@ -945,7 +945,7 @@ This change has no impact on grouping of the issues in Sentry. - Create User and Breadcrumb from map (#2820) -### Fixes +### Fixes - Improved performance serializing profiling data (#2863) - Possible crash in Core Data tracking (#2865) @@ -979,9 +979,9 @@ The `stitchAsyncCode` experimental option has been removed from `SentryOptions` - Add `name` and `geo` to User (#2710) ### Fixes - + - Correctly track and send GPU frame render data in profiles (#2823) -- Xcode 14.3 compiling issue regarding functions declaration with no prototype (#2852) +- Xcode 14.3 compiling issue regarding functions declaration with no prototype (#2852) ## 8.3.3 @@ -1007,7 +1007,7 @@ The `stitchAsyncCode` experimental option has been removed from `SentryOptions` ## 8.3.1 -### Fixes +### Fixes - Stop using UIScreen.main (#2762) - Profile timestamp alignment with transactions (#2771) and app start spans (#2772) @@ -1073,7 +1073,7 @@ This change might mark 3rd party library frames as in-app, which the SDK previou ### Features -This version adds a dependency on Swift. +This version adds a dependency on Swift. We renamed the default branch from `master` to `main`. We are going to keep the `master` branch for backwards compatibility for package managers pointing to the `master` branch. ### Features @@ -1089,7 +1089,7 @@ We renamed the default branch from `master` to `main`. We are going to keep the - Enable CaptureFailedRequests by default (#2507) - Support the [`SENTRY_DSN` environment variable](https://docs.sentry.io/platforms/apple/guides/macos/configuration/options/#dsn) on macOS (#2534) - Experimental MetricKit integration (#2519) for - - [MXHangDiagnostic](https://developer.apple.com/documentation/metrickit/mxhangdiagnostic) + - [MXHangDiagnostic](https://developer.apple.com/documentation/metrickit/mxhangdiagnostic) - [MXDiskWriteExceptionDiagnostic](https://developer.apple.com/documentation/metrickit/mxdiskwriteexceptiondiagnostic) - [MXCPUExceptionDiagnostic](https://developer.apple.com/documentation/metrickit/mxcpuexceptiondiagnostic) - Add a timeout for auto-generated transactions (#2535) @@ -1116,7 +1116,7 @@ We renamed the default branch from `master` to `main`. We are going to keep the - Make `SpanProtocol.data` non nullable (#2409) - Mark `- [SpanProtocol setExtraValue:forKey:]` as deprecated (#2413) - Make SpanContext immutable (#2408) - - Remove tags from SpanContext + - Remove tags from SpanContext - Remove context property from SentrySpan - Bump minimum supported OS versions to macOS 10.13, iOS 11, tvOS 11, and watchOS 4 (#2414) - Make public APIs Swift friendly @@ -1129,8 +1129,8 @@ We renamed the default branch from `master` to `main`. We are going to keep the - Remove `SentryScope.apply(to:maxBreadcrumb:)` (#2416) - Remove `- [SentryOptions initWithDict:didFailWithError:]` (#2404) - Remove `- [SentryOptions sdkInfo]` (#2404) - - Make SentrySession and SentrySDKInfo internal (#2451) -- Marks App hang's event stacktrace snapshot as true (#2441) + - Make SentrySession and SentrySDKInfo internal (#2451) +- Marks App hang's event stacktrace snapshot as true (#2441) - Enable user interaction tracing by default (#2442) - Remove default attachment content type (#2443) - Rename APM tracking feature flags to tracing (#2450) From 024f3db42eb4cac1d000af60534e5e32886023b4 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:36:04 +0100 Subject: [PATCH 6/7] chore(local-dev): Bump clang-format to 19.1.3 (#4494) --- Brewfile.lock.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Brewfile.lock.json b/Brewfile.lock.json index ca8b73ac018..85f08cf1f47 100644 --- a/Brewfile.lock.json +++ b/Brewfile.lock.json @@ -2,40 +2,40 @@ "entries": { "brew": { "clang-format": { - "version": "19.1.1", + "version": "19.1.3", "bottle": { "rebuild": 0, "root_url": "https://ghcr.io/v2/homebrew/core", "files": { "arm64_sequoia": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:7b5f8c066c04e831f51f2abf16312084e3fa098b0ff76abc6480967a2860bd24", - "sha256": "7b5f8c066c04e831f51f2abf16312084e3fa098b0ff76abc6480967a2860bd24" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:9df6e7a73647777ea7d721611ff214cb6dfb0035270f7c075706c10126127fe7", + "sha256": "9df6e7a73647777ea7d721611ff214cb6dfb0035270f7c075706c10126127fe7" }, "arm64_sonoma": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:e7ba64f5fba3cf0ceadaa3c520a2208642ce1169bffac8db1e9b56569195148e", - "sha256": "e7ba64f5fba3cf0ceadaa3c520a2208642ce1169bffac8db1e9b56569195148e" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:51c70ed59125cdc84a9e69c71519e0389302fa79ec69237daad87d56f880fef7", + "sha256": "51c70ed59125cdc84a9e69c71519e0389302fa79ec69237daad87d56f880fef7" }, "arm64_ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:ce317db950e3d268110f2bc62c5f1aa07cbb50dafd2603e168e363718a9d9e21", - "sha256": "ce317db950e3d268110f2bc62c5f1aa07cbb50dafd2603e168e363718a9d9e21" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:221b6502def9c8349e7b55503a925b7afad79e75edeaad2039d449156e31fe00", + "sha256": "221b6502def9c8349e7b55503a925b7afad79e75edeaad2039d449156e31fe00" }, "sonoma": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:43bcbde28012da49f5679bec7ba8d2c341771cee9909bddde1ec2e29e1fd8320", - "sha256": "43bcbde28012da49f5679bec7ba8d2c341771cee9909bddde1ec2e29e1fd8320" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:387d602bb80b80d5e46d091bb620080d5734022b0512b42be0a0368416e40ff5", + "sha256": "387d602bb80b80d5e46d091bb620080d5734022b0512b42be0a0368416e40ff5" }, "ventura": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:80ac7aac07528efb14db1928d1268db16033dcbaf73a0fa5c1d08817d3bf3ab4", - "sha256": "80ac7aac07528efb14db1928d1268db16033dcbaf73a0fa5c1d08817d3bf3ab4" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:8609c73a51e4a27538fec7cf473da6a8808a273291c04df0f15959c134104048", + "sha256": "8609c73a51e4a27538fec7cf473da6a8808a273291c04df0f15959c134104048" }, "x86_64_linux": { "cellar": ":any_skip_relocation", - "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:f8318eea6c50bf91462397af31ee5c20413dfb1a6625aa8b73d524f4b7396180", - "sha256": "f8318eea6c50bf91462397af31ee5c20413dfb1a6625aa8b73d524f4b7396180" + "url": "https://ghcr.io/v2/homebrew/core/clang-format/blobs/sha256:b1f7cdba80030cd264f64d22fc3d5e0865c7167a0b2462a64bfe82d155e821c2", + "sha256": "b1f7cdba80030cd264f64d22fc3d5e0865c7167a0b2462a64bfe82d155e821c2" } } } From ed470cf022997ff416e1e757297c01de6b2a48c6 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Thu, 31 Oct 2024 10:33:21 -0800 Subject: [PATCH 7/7] ref(user feedback): move objc sources to correct location (#4490) --- Sentry.xcodeproj/project.pbxproj | 24 +++++++++---------- Sources/Sentry/SentrySDK.m | 5 ++-- .../SentryUserFeedbackIntegration.m} | 8 +++---- .../include/SentryUserFeedbackIntegration.h} | 2 +- ...SentryUserFeedbackIntegrationDriver.swift} | 2 +- 5 files changed, 20 insertions(+), 21 deletions(-) rename Sources/{Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.m => Sentry/SentryUserFeedbackIntegration.m} (59%) rename Sources/{Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.h => Sentry/include/SentryUserFeedbackIntegration.h} (76%) rename Sources/Swift/Integrations/UserFeedback/{SentryUserFeedbackIntegration.swift => SentryUserFeedbackIntegrationDriver.swift} (98%) diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index a1e3c062796..ae4646f0239 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -670,7 +670,7 @@ 849AC40029E0C1FF00889C16 /* SentryFormatterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849AC3FF29E0C1FF00889C16 /* SentryFormatterTests.swift */; }; 849B8F992C6E906900148E1F /* SentryUserFeedbackFormConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F942C6E906900148E1F /* SentryUserFeedbackFormConfiguration.swift */; }; 849B8F9A2C6E906900148E1F /* SentryUserFeedbackConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F952C6E906900148E1F /* SentryUserFeedbackConfiguration.swift */; }; - 849B8F9B2C6E906900148E1F /* SentryUserFeedbackIntegration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegration.swift */; }; + 849B8F9B2C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift */; }; 849B8F9C2C6E906900148E1F /* SentryUserFeedbackThemeConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F972C6E906900148E1F /* SentryUserFeedbackThemeConfiguration.swift */; }; 849B8F9D2C6E906900148E1F /* SentryUserFeedbackWidgetConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849B8F982C6E906900148E1F /* SentryUserFeedbackWidgetConfiguration.swift */; }; 84A305492BC7328400D84283 /* SentryAppLaunchProfilingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A305472BC72A0A00D84283 /* SentryAppLaunchProfilingTests.swift */; }; @@ -704,8 +704,8 @@ 84B7FA4629B2935F00AD93B1 /* ClearTestState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD47B4C268F0B080076A663 /* ClearTestState.swift */; }; 84BA62272CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84BA62262CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift */; }; 84CFA4CA2C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84CFA4C92C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift */; }; - 84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m */; }; - 84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h */; }; + 84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m */; }; + 84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h */; }; 84DEE86B2B686BD400A7BC17 /* SentrySamplerDecision.h in Headers */ = {isa = PBXBuildFile; fileRef = 84DEE86A2B686BD400A7BC17 /* SentrySamplerDecision.h */; }; 84DEE8762B69AD6400A7BC17 /* SentryLaunchProfiling.h in Headers */ = {isa = PBXBuildFile; fileRef = 84DEE8752B69AD6400A7BC17 /* SentryLaunchProfiling.h */; }; 84E13B842CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E13B832CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift */; }; @@ -1746,7 +1746,7 @@ 849AC3FF29E0C1FF00889C16 /* SentryFormatterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SentryFormatterTests.swift; sourceTree = ""; }; 849B8F942C6E906900148E1F /* SentryUserFeedbackFormConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SentryUserFeedbackFormConfiguration.swift; path = Configuration/SentryUserFeedbackFormConfiguration.swift; sourceTree = ""; }; 849B8F952C6E906900148E1F /* SentryUserFeedbackConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SentryUserFeedbackConfiguration.swift; path = Configuration/SentryUserFeedbackConfiguration.swift; sourceTree = ""; }; - 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackIntegration.swift; sourceTree = ""; }; + 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackIntegrationDriver.swift; sourceTree = ""; }; 849B8F972C6E906900148E1F /* SentryUserFeedbackThemeConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SentryUserFeedbackThemeConfiguration.swift; path = Configuration/SentryUserFeedbackThemeConfiguration.swift; sourceTree = ""; }; 849B8F982C6E906900148E1F /* SentryUserFeedbackWidgetConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SentryUserFeedbackWidgetConfiguration.swift; path = Configuration/SentryUserFeedbackWidgetConfiguration.swift; sourceTree = ""; }; 84A305472BC72A0A00D84283 /* SentryAppLaunchProfilingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryAppLaunchProfilingTests.swift; sourceTree = ""; }; @@ -1771,8 +1771,8 @@ 84BA62262CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackWidgetButtonView.swift; sourceTree = ""; }; 84C47B2B2A09239100DAEB8A /* .codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .codecov.yml; sourceTree = ""; }; 84CFA4C92C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackWidget.swift; sourceTree = ""; }; - 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryUserFeedbackIntegrationShell.h; sourceTree = ""; }; - 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryUserFeedbackIntegrationShell.m; sourceTree = ""; }; + 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryUserFeedbackIntegration.h; path = ../../../Sentry/include/SentryUserFeedbackIntegration.h; sourceTree = ""; }; + 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SentryUserFeedbackIntegration.m; path = ../../../Sentry/SentryUserFeedbackIntegration.m; sourceTree = ""; }; 84DEE86A2B686BD400A7BC17 /* SentrySamplerDecision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentrySamplerDecision.h; path = include/SentrySamplerDecision.h; sourceTree = ""; }; 84DEE8752B69AD6400A7BC17 /* SentryLaunchProfiling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryLaunchProfiling.h; path = Sources/Sentry/include/SentryLaunchProfiling.h; sourceTree = SOURCE_ROOT; }; 84E13B832CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUserFeedbackWidgetButtonMegaphoneIconView.swift; sourceTree = ""; }; @@ -3518,9 +3518,9 @@ isa = PBXGroup; children = ( 849B8F9E2C70091A00148E1F /* Configuration */, - 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegration.swift */, - 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h */, - 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m */, + 849B8F962C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift */, + 84CFA4CB2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h */, + 84CFA4CC2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m */, 84CFA4C92C9DF884008DA5F4 /* SentryUserFeedbackWidget.swift */, 84BA62262CAE2EEF0049F636 /* SentryUserFeedbackWidgetButtonView.swift */, 84E13B832CBF1D91003B52EC /* SentryUserFeedbackWidgetButtonMegaphoneIconView.swift */, @@ -3982,7 +3982,7 @@ 8E133FA625E72EB400ABD0BF /* SentrySamplingContext.h in Headers */, 0A9BF4E428A114B50068D266 /* SentryViewHierarchyIntegration.h in Headers */, D8BBD32728FD9FC00011F850 /* SentrySwift.h in Headers */, - 84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.h in Headers */, + 84CFA4CE2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.h in Headers */, 8E4E7C7425DAAB49006AB9E2 /* SentrySpanProtocol.h in Headers */, 8EC4CF4A25C38DAA0093DEE9 /* SentrySpanStatus.h in Headers */, 8ECC673D25C23996000E2BF6 /* SentrySpanId.h in Headers */, @@ -4604,7 +4604,7 @@ 7B63459F280EBA7200CFA05A /* SentryUIEventTracker.m in Sources */, 7BF9EF782722B35D00B5BBEF /* SentrySubClassFinder.m in Sources */, D80CD8D32B751447002F710B /* SentryMXCallStackTree.swift in Sources */, - 84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegrationShell.m in Sources */, + 84CFA4CD2C9E0CA3008DA5F4 /* SentryUserFeedbackIntegration.m in Sources */, 7BCFA71627D0BB50008C662C /* SentryANRTrackerV1.m in Sources */, 8459FCC02BD73EB20038E9C9 /* SentryProfilerSerialization.mm in Sources */, 621C884A2CAD23E9000EABCB /* SentryCaptureTransactionWithProfile.mm in Sources */, @@ -4727,7 +4727,7 @@ 849B8F9D2C6E906900148E1F /* SentryUserFeedbackWidgetConfiguration.swift in Sources */, 639FCFA51EBC809A00778193 /* SentryStacktrace.m in Sources */, D84D2CC32C29AD120011AF8A /* SentrySessionReplay.swift in Sources */, - 849B8F9B2C6E906900148E1F /* SentryUserFeedbackIntegration.swift in Sources */, + 849B8F9B2C6E906900148E1F /* SentryUserFeedbackIntegrationDriver.swift in Sources */, 63FE70DF20DA4C1000CDBAE8 /* SentryCrashMonitorType.c in Sources */, 7BF9EF7E2722B91F00B5BBEF /* SentryDefaultObjCRuntimeWrapper.m in Sources */, 7BC3936E25B1AB72004F03D3 /* SentryLevelMapper.m in Sources */, diff --git a/Sources/Sentry/SentrySDK.m b/Sources/Sentry/SentrySDK.m index 83602c3e643..9a6048a7735 100644 --- a/Sources/Sentry/SentrySDK.m +++ b/Sources/Sentry/SentrySDK.m @@ -24,7 +24,7 @@ #import "SentrySerialization.h" #import "SentrySwift.h" #import "SentryTransactionContext.h" -#import "SentryUserFeedbackIntegrationShell.h" +#import "SentryUserFeedbackIntegration.h" #if TARGET_OS_OSX # import "SentryCrashExceptionApplication.h" @@ -467,8 +467,7 @@ + (void)installIntegrations #if TARGET_OS_IOS && SENTRY_HAS_UIKIT if (@available(iOS 13.0, *)) { if (options.userFeedbackConfiguration != nil) { - [integrationNames - addObject:NSStringFromClass([SentryUserFeedbackIntegrationShell class])]; + [integrationNames addObject:NSStringFromClass([SentryUserFeedbackIntegration class])]; } } #endif // TARGET_OS_IOS && SENTRY_HAS_UIKIT diff --git a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.m b/Sources/Sentry/SentryUserFeedbackIntegration.m similarity index 59% rename from Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.m rename to Sources/Sentry/SentryUserFeedbackIntegration.m index b001cc57b8f..f51f08059ab 100644 --- a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.m +++ b/Sources/Sentry/SentryUserFeedbackIntegration.m @@ -1,16 +1,16 @@ -#import "SentryUserFeedbackIntegrationShell.h" +#import "SentryUserFeedbackIntegration.h" #import "SentryOptions+Private.h" #import "SentrySwift.h" #if TARGET_OS_IOS && SENTRY_HAS_UIKIT -@implementation SentryUserFeedbackIntegrationShell { - SentryUserFeedbackIntegration *_driver; +@implementation SentryUserFeedbackIntegration { + SentryUserFeedbackIntegrationDriver *_driver; } - (BOOL)installWithOptions:(SentryOptions *)options { - _driver = [[SentryUserFeedbackIntegration alloc] + _driver = [[SentryUserFeedbackIntegrationDriver alloc] initWithConfiguration:options.userFeedbackConfiguration]; return YES; } diff --git a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.h b/Sources/Sentry/include/SentryUserFeedbackIntegration.h similarity index 76% rename from Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.h rename to Sources/Sentry/include/SentryUserFeedbackIntegration.h index d4062328c4c..763201fcfd4 100644 --- a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationShell.h +++ b/Sources/Sentry/include/SentryUserFeedbackIntegration.h @@ -7,7 +7,7 @@ NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(13.0)) -@interface SentryUserFeedbackIntegrationShell : SentryBaseIntegration +@interface SentryUserFeedbackIntegration : SentryBaseIntegration @end diff --git a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegration.swift b/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationDriver.swift similarity index 98% rename from Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegration.swift rename to Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationDriver.swift index 562321811a2..f9b3d7167c8 100644 --- a/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegration.swift +++ b/Sources/Swift/Integrations/UserFeedback/SentryUserFeedbackIntegrationDriver.swift @@ -9,7 +9,7 @@ import UIKit */ @available(iOS 13.0, *) @objcMembers -class SentryUserFeedbackIntegration: NSObject { +class SentryUserFeedbackIntegrationDriver: NSObject { let configuration: SentryUserFeedbackConfiguration private var window: SentryUserFeedbackWidget.Window?