Skip to content

Commit 9919db5

Browse files
authored
Merge e60a21f into 52588a5
2 parents 52588a5 + e60a21f commit 9919db5

File tree

234 files changed

+4078
-1121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+4078
-1121
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@
3131
- Fix rendering method for fast view rendering (#6360)
3232
- Fix issue where the thread that generated an event could be missing when more than 100 threads are running (#6377)
3333
- Fix wrong Frame Delay when becoming active, which lead to false reported app hangs when the app moves to the foreground after being in the background (#6381)
34+
- Session Replay masking improvements (#6292)
35+
- Fix SwiftUI.List background decoration view causing incorrect clipping of screen content
36+
- Fix sublayer rendering order by properly sorting by zPosition with insertion order as tie-breaker
37+
- Fix UISwitch internal images being incorrectly redacted
38+
- Fix UITextField placeholder text (UITextFieldLabel) not being detected for redaction
39+
- Use string-based class comparison to avoid triggering Objective-C +initialize on background threads
40+
- Add layer class filtering for views used in multiple contexts (e.g., SwiftUI._UIGraphicsView)
41+
- Improve transform calculations for views with custom anchor points
42+
- Fix axis-aligned transform detection for optimized opaque view clipping
3443

3544
### Improvements
3645

Sentry.xcodeproj/project.pbxproj

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@
769769
D43B26D62D70964C007747FD /* SentrySpanOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D43B26D52D709648007747FD /* SentrySpanOperation.m */; };
770770
D43B26D82D70A550007747FD /* SentryTraceOrigin.m in Sources */ = {isa = PBXBuildFile; fileRef = D43B26D72D70A54A007747FD /* SentryTraceOrigin.m */; };
771771
D43B26DA2D70A612007747FD /* SentrySpanDataKey.m in Sources */ = {isa = PBXBuildFile; fileRef = D43B26D92D70A60E007747FD /* SentrySpanDataKey.m */; };
772+
D43C1BE82E8FB85400CD5D67 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = D43C1BE72E8FB85400CD5D67 /* SnapshotTesting */; };
772773
D4411DD52E02B74900EA4987 /* ArrayAccessesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4411DD42E02B74100EA4987 /* ArrayAccessesTests.swift */; };
773774
D44B16722DE464AD006DBDB3 /* TestDispatchFactoryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D44B16712DE464A9006DBDB3 /* TestDispatchFactoryTests.swift */; };
774775
D451ED5D2D92ECD200C9BEA8 /* SentryOnDemandReplayError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D451ED5C2D92ECD200C9BEA8 /* SentryOnDemandReplayError.swift */; };
@@ -815,6 +816,11 @@
815816
D4AF00212D2E92FD00F5F3D7 /* SentryNSFileManagerSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = D4AF00202D2E92FD00F5F3D7 /* SentryNSFileManagerSwizzling.m */; };
816817
D4AF00232D2E931000F5F3D7 /* SentryNSFileManagerSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = D4AF00222D2E931000F5F3D7 /* SentryNSFileManagerSwizzling.h */; };
817818
D4AF00252D2E93C400F5F3D7 /* SentryNSFileManagerSwizzlingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D4AF00242D2E93C400F5F3D7 /* SentryNSFileManagerSwizzlingTests.m */; };
819+
D4AF7D222E93FFCA004F0F59 /* SentryUIRedactBuilderTests+ReactNative.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AF7D212E93FFCA004F0F59 /* SentryUIRedactBuilderTests+ReactNative.swift */; };
820+
D4AF7D262E9401EB004F0F59 /* SentryUIRedactBuilderTests+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AF7D252E9401EB004F0F59 /* SentryUIRedactBuilderTests+UIKit.swift */; };
821+
D4AF7D282E9402AC004F0F59 /* SentryUIRedactBuilderTests+SpecialViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AF7D272E9402AC004F0F59 /* SentryUIRedactBuilderTests+SpecialViews.swift */; };
822+
D4AF7D2A2E940493004F0F59 /* SentryUIRedactBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AF7D292E940492004F0F59 /* SentryUIRedactBuilderTests.swift */; };
823+
D4AF7D2C2E9404ED004F0F59 /* SentryUIRedactBuilderTests+EdgeCases.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AF7D2B2E9404ED004F0F59 /* SentryUIRedactBuilderTests+EdgeCases.swift */; };
818824
D4B0DC7F2DA9257A00DE61B6 /* SentryRenderVideoResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4B0DC7E2DA9257200DE61B6 /* SentryRenderVideoResult.swift */; };
819825
D4B339F92EA7823000359F3A /* SentryTestUtilsDynamic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D84DAD4D2B17428D003CF120 /* SentryTestUtilsDynamic.framework */; };
820826
D4B339FA2EA7823000359F3A /* SentryTestUtilsDynamic.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D84DAD4D2B17428D003CF120 /* SentryTestUtilsDynamic.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
@@ -967,7 +973,7 @@
967973
D8DBE0CA2C0E093000FAB1FD /* SentryTouchTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DBE0C92C0E093000FAB1FD /* SentryTouchTrackerTests.swift */; };
968974
D8DBE0D22C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DBE0D12C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift */; };
969975
D8F67AF12BE0D33F00C9197B /* UIImageHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */; };
970-
D8F67AF42BE10F9600C9197B /* SentryUIRedactBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests.swift */; };
976+
D8F67AF42BE10F9600C9197B /* SentryUIRedactBuilderTests+Common.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests+Common.swift */; };
971977
D8F67B1B2BE9728600C9197B /* SentrySRDefaultBreadcrumbConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67B1A2BE9728600C9197B /* SentrySRDefaultBreadcrumbConverter.swift */; };
972978
D8F67B222BEAB6CC00C9197B /* SentryRRWebEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67B212BEAB6CC00C9197B /* SentryRRWebEvent.swift */; };
973979
D8F6A2472885512100320515 /* SentryPredicateDescriptor.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F6A2452885512100320515 /* SentryPredicateDescriptor.m */; };
@@ -2181,6 +2187,11 @@
21812187
D4AF00202D2E92FD00F5F3D7 /* SentryNSFileManagerSwizzling.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryNSFileManagerSwizzling.m; sourceTree = "<group>"; };
21822188
D4AF00222D2E931000F5F3D7 /* SentryNSFileManagerSwizzling.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryNSFileManagerSwizzling.h; path = include/SentryNSFileManagerSwizzling.h; sourceTree = "<group>"; };
21832189
D4AF00242D2E93C400F5F3D7 /* SentryNSFileManagerSwizzlingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryNSFileManagerSwizzlingTests.m; sourceTree = "<group>"; };
2190+
D4AF7D212E93FFCA004F0F59 /* SentryUIRedactBuilderTests+ReactNative.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+ReactNative.swift"; sourceTree = "<group>"; };
2191+
D4AF7D252E9401EB004F0F59 /* SentryUIRedactBuilderTests+UIKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+UIKit.swift"; sourceTree = "<group>"; };
2192+
D4AF7D272E9402AC004F0F59 /* SentryUIRedactBuilderTests+SpecialViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+SpecialViews.swift"; sourceTree = "<group>"; };
2193+
D4AF7D292E940492004F0F59 /* SentryUIRedactBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIRedactBuilderTests.swift; sourceTree = "<group>"; };
2194+
D4AF7D2B2E9404ED004F0F59 /* SentryUIRedactBuilderTests+EdgeCases.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+EdgeCases.swift"; sourceTree = "<group>"; };
21842195
D4B0DC7E2DA9257200DE61B6 /* SentryRenderVideoResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRenderVideoResult.swift; sourceTree = "<group>"; };
21852196
D4BCA0C22DA93C25009E49AB /* SentrySessionReplayIntegration+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentrySessionReplayIntegration+Test.h"; sourceTree = "<group>"; };
21862197
D4C5F5992D4249E0002A9BF6 /* DataSentryTracingIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataSentryTracingIntegrationTests.swift; sourceTree = "<group>"; };
@@ -2347,7 +2358,7 @@
23472358
D8F01DE42A126B62008F4996 /* HybridPod.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = HybridPod.podspec; sourceTree = "<group>"; };
23482359
D8F01DE52A126BF5008F4996 /* HybridTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HybridTest.swift; sourceTree = "<group>"; };
23492360
D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelperTests.swift; sourceTree = "<group>"; };
2350-
D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIRedactBuilderTests.swift; sourceTree = "<group>"; };
2361+
D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests+Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+Common.swift"; sourceTree = "<group>"; };
23512362
D8F67B1A2BE9728600C9197B /* SentrySRDefaultBreadcrumbConverter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySRDefaultBreadcrumbConverter.swift; sourceTree = "<group>"; };
23522363
D8F67B212BEAB6CC00C9197B /* SentryRRWebEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRRWebEvent.swift; sourceTree = "<group>"; };
23532364
D8F6A2452885512100320515 /* SentryPredicateDescriptor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryPredicateDescriptor.m; sourceTree = "<group>"; };
@@ -2546,6 +2557,7 @@
25462557
buildActionMask = 2147483647;
25472558
files = (
25482559
8431F01C29B2854200D8DC56 /* libSentryTestUtils.a in Frameworks */,
2560+
D43C1BE82E8FB85400CD5D67 /* SnapshotTesting in Frameworks */,
25492561
D84DAD592B1742C1003CF120 /* SentryTestUtilsDynamic.framework in Frameworks */,
25502562
63AA766A1EB8CB2F00D153DE /* Sentry.framework in Frameworks */,
25512563
);
@@ -4238,8 +4250,14 @@
42384250
D4009EA02D77196F0007AF30 /* ViewCapture */ = {
42394251
isa = PBXGroup;
42404252
children = (
4253+
D4AF802E2E965188004F0F59 /* __Snapshots__ */,
42414254
D82915622C85EF0C00A6CDD4 /* SentryViewPhotographerTests.swift */,
4242-
D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests.swift */,
4255+
D4AF7D292E940492004F0F59 /* SentryUIRedactBuilderTests.swift */,
4256+
D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests+Common.swift */,
4257+
D4AF7D2B2E9404ED004F0F59 /* SentryUIRedactBuilderTests+EdgeCases.swift */,
4258+
D4AF7D272E9402AC004F0F59 /* SentryUIRedactBuilderTests+SpecialViews.swift */,
4259+
D4AF7D252E9401EB004F0F59 /* SentryUIRedactBuilderTests+UIKit.swift */,
4260+
D4AF7D212E93FFCA004F0F59 /* SentryUIRedactBuilderTests+ReactNative.swift */,
42434261
D45E2D762E003EBF0072A6B7 /* TestRedactOptions.swift */,
42444262
);
42454263
path = ViewCapture;
@@ -4346,6 +4364,13 @@
43464364
path = Screenshot;
43474365
sourceTree = "<group>";
43484366
};
4367+
D4AF802E2E965188004F0F59 /* __Snapshots__ */ = {
4368+
isa = PBXGroup;
4369+
children = (
4370+
);
4371+
path = __Snapshots__;
4372+
sourceTree = "<group>";
4373+
};
43494374
D4A0C22A2E9E3CE100791353 /* InfoPlist */ = {
43504375
isa = PBXGroup;
43514376
children = (
@@ -5379,6 +5404,7 @@
53795404
);
53805405
name = SentryTests;
53815406
packageProductDependencies = (
5407+
D43C1BE72E8FB85400CD5D67 /* SnapshotTesting */,
53825408
);
53835409
productName = "Tests-iOS";
53845410
productReference = 63AA76651EB8CB2F00D153DE /* SentryTests.xctest */;
@@ -5551,6 +5577,7 @@
55515577
);
55525578
mainGroup = 6327C5C91EB8A783004E799B;
55535579
packageReferences = (
5580+
D43C1BE62E8FB85400CD5D67 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */,
55545581
);
55555582
productRefGroup = 6327C5D41EB8A783004E799B /* Products */;
55565583
projectDirPath = "";
@@ -6120,7 +6147,8 @@
61206147
FAC62B652E15A4100003909D /* SentrySDKThreadTests.swift in Sources */,
61216148
D82915632C85EF0C00A6CDD4 /* SentryViewPhotographerTests.swift in Sources */,
61226149
D8DBE0CA2C0E093000FAB1FD /* SentryTouchTrackerTests.swift in Sources */,
6123-
D8F67AF42BE10F9600C9197B /* SentryUIRedactBuilderTests.swift in Sources */,
6150+
D8F67AF42BE10F9600C9197B /* SentryUIRedactBuilderTests+Common.swift in Sources */,
6151+
D4AF7D2C2E9404ED004F0F59 /* SentryUIRedactBuilderTests+EdgeCases.swift in Sources */,
61246152
92ECD7482E05B57C0063EC10 /* SentryLogAttributeTests.swift in Sources */,
61256153
63B819141EC352A7002FDF4C /* SentryInterfacesTests.m in Sources */,
61266154
92B6BDA92E05B8F600D538B3 /* SentryLogLevelTests.swift in Sources */,
@@ -6194,6 +6222,7 @@
61946222
D45E2D772E003EBF0072A6B7 /* TestRedactOptions.swift in Sources */,
61956223
63FE720520DA66EC00CDBAE8 /* FileBasedTestCase.m in Sources */,
61966224
51B15F802BE88D510026A2F2 /* URLSessionTaskHelperTests.swift in Sources */,
6225+
D4AF7D262E9401EB004F0F59 /* SentryUIRedactBuilderTests+UIKit.swift in Sources */,
61976226
63EED6C32237989300E02400 /* SentryOptionsTest.m in Sources */,
61986227
7BBD18B22451804C00427C76 /* SentryRetryAfterHeaderParserTests.swift in Sources */,
61996228
7BD337E424A356180050DB6E /* SentryCrashIntegrationTests.swift in Sources */,
@@ -6206,6 +6235,7 @@
62066235
62F4DDA12C04CB9700588890 /* SentryBaggageSerializationTests.swift in Sources */,
62076236
7BE912AF272166DD00E49E62 /* SentryNoOpSpanTests.swift in Sources */,
62086237
D4F2B5352D0C69D500649E42 /* SentryCrashCTests.swift in Sources */,
6238+
D4AF7D2A2E940493004F0F59 /* SentryUIRedactBuilderTests.swift in Sources */,
62096239
7B56D73524616E5600B842DA /* SentryConcurrentRateLimitsDictionaryTests.swift in Sources */,
62106240
7B7D8730248648AD00D2ECFF /* SentryStacktraceBuilderTests.swift in Sources */,
62116241
FA21A2EF2E60E9CB00E7EADB /* EnvelopeComparison.swift in Sources */,
@@ -6319,6 +6349,7 @@
63196349
D80694C42B7CC9AE00B820E6 /* SentryReplayEventTests.swift in Sources */,
63206350
7B34721728086A9D0041F047 /* SentrySwizzleWrapperTests.swift in Sources */,
63216351
8EC4CF5025C3A0070093DEE9 /* SentrySpanContextTests.swift in Sources */,
6352+
D4AF7D282E9402AC004F0F59 /* SentryUIRedactBuilderTests+SpecialViews.swift in Sources */,
63226353
6281C5742D3E50DF009D0978 /* ArbitraryDataTests.swift in Sources */,
63236354
7BE0DC2F272ABAF6004FA8B7 /* SentryAutoBreadcrumbTrackingIntegrationTests.swift in Sources */,
63246355
7B869EBE249B964D004F4FDB /* SentryThreadEquality.swift in Sources */,
@@ -6403,6 +6434,7 @@
64036434
7B68D93625FF5F1A0082D139 /* SentryAppState+Equality.m in Sources */,
64046435
7B5CAF7E27F5AD3500ED0DB6 /* TestNSURLRequestBuilder.m in Sources */,
64056436
D467125E2DCCFF2500D4074A /* SentryReplayOptionsObjcTests.m in Sources */,
6437+
D4AF7D222E93FFCA004F0F59 /* SentryUIRedactBuilderTests+ReactNative.swift in Sources */,
64066438
7BF69E072987D1FE002EBCA4 /* SentryCrashDoctorTests.swift in Sources */,
64076439
7B4F22DC294089530067EA17 /* FormatHexAddress.swift in Sources */,
64086440
8EAC7FF8265C8910005B44E5 /* SentryTracerTests.swift in Sources */,
@@ -8952,6 +8984,25 @@
89528984
defaultConfigurationName = Release;
89538985
};
89548986
/* End XCConfigurationList section */
8987+
8988+
/* Begin XCRemoteSwiftPackageReference section */
8989+
D43C1BE62E8FB85400CD5D67 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {
8990+
isa = XCRemoteSwiftPackageReference;
8991+
repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing";
8992+
requirement = {
8993+
kind = upToNextMajorVersion;
8994+
minimumVersion = 1.18.7;
8995+
};
8996+
};
8997+
/* End XCRemoteSwiftPackageReference section */
8998+
8999+
/* Begin XCSwiftPackageProductDependency section */
9000+
D43C1BE72E8FB85400CD5D67 /* SnapshotTesting */ = {
9001+
isa = XCSwiftPackageProductDependency;
9002+
package = D43C1BE62E8FB85400CD5D67 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
9003+
productName = SnapshotTesting;
9004+
};
9005+
/* End XCSwiftPackageProductDependency section */
89559006
};
89569007
rootObject = 6327C5CA1EB8A783004E799B /* Project object */;
89579008
}

Sources/Swift/Core/Tools/ViewCapture/SentryRedactRegion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Foundation
44
import ObjectiveC.NSObjCRuntime
55
import UIKit
66

7-
final class SentryRedactRegion {
7+
struct SentryRedactRegion: Equatable {
88
let size: CGSize
99
let transform: CGAffineTransform
1010
let type: SentryRedactRegionType

Sources/Swift/Core/Tools/ViewCapture/SentryRedactRegionType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
public enum SentryRedactRegionType: String, Codable {
1+
public enum SentryRedactRegionType: String, Codable, Equatable {
22
/// Redacts the region.
33
case redact = "redact"
44

0 commit comments

Comments
 (0)