Skip to content

Commit 8d12b30

Browse files
authored
Merge 4015202 into debf3e9
2 parents debf3e9 + 4015202 commit 8d12b30

File tree

352 files changed

+4029
-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.

352 files changed

+4029
-1121
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828
- Fix rendering method for fast view rendering (#6360)
2929
- Fix issue where the thread that generated an event could be missing when more than 100 threads are running (#6377)
3030
- 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)
31+
- Session Replay masking improvements (#6292)
32+
- Fix SwiftUI.List background decoration view causing incorrect clipping of screen content
33+
- Fix sublayer rendering order by properly sorting by zPosition with insertion order as tie-breaker
34+
- Fix UISwitch internal images being incorrectly redacted
35+
- Fix UITextField placeholder text (UITextFieldLabel) not being detected for redaction
36+
- Use string-based class comparison to avoid triggering Objective-C +initialize on background threads
37+
- Add layer class filtering for views used in multiple contexts (e.g., SwiftUI._UIGraphicsView)
38+
- Improve transform calculations for views with custom anchor points
39+
- Fix axis-aligned transform detection for optimized opaque view clipping
3140

3241
### Improvements
3342

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 */; };
@@ -2180,6 +2186,11 @@
21802186
D4AF00202D2E92FD00F5F3D7 /* SentryNSFileManagerSwizzling.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryNSFileManagerSwizzling.m; sourceTree = "<group>"; };
21812187
D4AF00222D2E931000F5F3D7 /* SentryNSFileManagerSwizzling.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryNSFileManagerSwizzling.h; path = include/SentryNSFileManagerSwizzling.h; sourceTree = "<group>"; };
21822188
D4AF00242D2E93C400F5F3D7 /* SentryNSFileManagerSwizzlingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryNSFileManagerSwizzlingTests.m; sourceTree = "<group>"; };
2189+
D4AF7D212E93FFCA004F0F59 /* SentryUIRedactBuilderTests+ReactNative.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+ReactNative.swift"; sourceTree = "<group>"; };
2190+
D4AF7D252E9401EB004F0F59 /* SentryUIRedactBuilderTests+UIKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+UIKit.swift"; sourceTree = "<group>"; };
2191+
D4AF7D272E9402AC004F0F59 /* SentryUIRedactBuilderTests+SpecialViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+SpecialViews.swift"; sourceTree = "<group>"; };
2192+
D4AF7D292E940492004F0F59 /* SentryUIRedactBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIRedactBuilderTests.swift; sourceTree = "<group>"; };
2193+
D4AF7D2B2E9404ED004F0F59 /* SentryUIRedactBuilderTests+EdgeCases.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+EdgeCases.swift"; sourceTree = "<group>"; };
21832194
D4B0DC7E2DA9257200DE61B6 /* SentryRenderVideoResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRenderVideoResult.swift; sourceTree = "<group>"; };
21842195
D4BCA0C22DA93C25009E49AB /* SentrySessionReplayIntegration+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentrySessionReplayIntegration+Test.h"; sourceTree = "<group>"; };
21852196
D4C5F5992D4249E0002A9BF6 /* DataSentryTracingIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataSentryTracingIntegrationTests.swift; sourceTree = "<group>"; };
@@ -2346,7 +2357,7 @@
23462357
D8F01DE42A126B62008F4996 /* HybridPod.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = HybridPod.podspec; sourceTree = "<group>"; };
23472358
D8F01DE52A126BF5008F4996 /* HybridTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HybridTest.swift; sourceTree = "<group>"; };
23482359
D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelperTests.swift; sourceTree = "<group>"; };
2349-
D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIRedactBuilderTests.swift; sourceTree = "<group>"; };
2360+
D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests+Common.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SentryUIRedactBuilderTests+Common.swift"; sourceTree = "<group>"; };
23502361
D8F67B1A2BE9728600C9197B /* SentrySRDefaultBreadcrumbConverter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySRDefaultBreadcrumbConverter.swift; sourceTree = "<group>"; };
23512362
D8F67B212BEAB6CC00C9197B /* SentryRRWebEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRRWebEvent.swift; sourceTree = "<group>"; };
23522363
D8F6A2452885512100320515 /* SentryPredicateDescriptor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryPredicateDescriptor.m; sourceTree = "<group>"; };
@@ -2544,6 +2555,7 @@
25442555
buildActionMask = 2147483647;
25452556
files = (
25462557
8431F01C29B2854200D8DC56 /* libSentryTestUtils.a in Frameworks */,
2558+
D43C1BE82E8FB85400CD5D67 /* SnapshotTesting in Frameworks */,
25472559
D84DAD592B1742C1003CF120 /* SentryTestUtilsDynamic.framework in Frameworks */,
25482560
63AA766A1EB8CB2F00D153DE /* Sentry.framework in Frameworks */,
25492561
);
@@ -4235,8 +4247,14 @@
42354247
D4009EA02D77196F0007AF30 /* ViewCapture */ = {
42364248
isa = PBXGroup;
42374249
children = (
4250+
D4AF802E2E965188004F0F59 /* __Snapshots__ */,
42384251
D82915622C85EF0C00A6CDD4 /* SentryViewPhotographerTests.swift */,
4239-
D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests.swift */,
4252+
D4AF7D292E940492004F0F59 /* SentryUIRedactBuilderTests.swift */,
4253+
D8F67AF22BE10F7600C9197B /* SentryUIRedactBuilderTests+Common.swift */,
4254+
D4AF7D2B2E9404ED004F0F59 /* SentryUIRedactBuilderTests+EdgeCases.swift */,
4255+
D4AF7D272E9402AC004F0F59 /* SentryUIRedactBuilderTests+SpecialViews.swift */,
4256+
D4AF7D252E9401EB004F0F59 /* SentryUIRedactBuilderTests+UIKit.swift */,
4257+
D4AF7D212E93FFCA004F0F59 /* SentryUIRedactBuilderTests+ReactNative.swift */,
42404258
D45E2D762E003EBF0072A6B7 /* TestRedactOptions.swift */,
42414259
);
42424260
path = ViewCapture;
@@ -4343,6 +4361,13 @@
43434361
path = Screenshot;
43444362
sourceTree = "<group>";
43454363
};
4364+
D4AF802E2E965188004F0F59 /* __Snapshots__ */ = {
4365+
isa = PBXGroup;
4366+
children = (
4367+
);
4368+
path = __Snapshots__;
4369+
sourceTree = "<group>";
4370+
};
43464371
D4A0C22A2E9E3CE100791353 /* InfoPlist */ = {
43474372
isa = PBXGroup;
43484373
children = (
@@ -5376,6 +5401,7 @@
53765401
);
53775402
name = SentryTests;
53785403
packageProductDependencies = (
5404+
D43C1BE72E8FB85400CD5D67 /* SnapshotTesting */,
53795405
);
53805406
productName = "Tests-iOS";
53815407
productReference = 63AA76651EB8CB2F00D153DE /* SentryTests.xctest */;
@@ -5548,6 +5574,7 @@
55485574
);
55495575
mainGroup = 6327C5C91EB8A783004E799B;
55505576
packageReferences = (
5577+
D43C1BE62E8FB85400CD5D67 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */,
55515578
);
55525579
productRefGroup = 6327C5D41EB8A783004E799B /* Products */;
55535580
projectDirPath = "";
@@ -6117,7 +6144,8 @@
61176144
FAC62B652E15A4100003909D /* SentrySDKThreadTests.swift in Sources */,
61186145
D82915632C85EF0C00A6CDD4 /* SentryViewPhotographerTests.swift in Sources */,
61196146
D8DBE0CA2C0E093000FAB1FD /* SentryTouchTrackerTests.swift in Sources */,
6120-
D8F67AF42BE10F9600C9197B /* SentryUIRedactBuilderTests.swift in Sources */,
6147+
D8F67AF42BE10F9600C9197B /* SentryUIRedactBuilderTests+Common.swift in Sources */,
6148+
D4AF7D2C2E9404ED004F0F59 /* SentryUIRedactBuilderTests+EdgeCases.swift in Sources */,
61216149
92ECD7482E05B57C0063EC10 /* SentryLogAttributeTests.swift in Sources */,
61226150
63B819141EC352A7002FDF4C /* SentryInterfacesTests.m in Sources */,
61236151
92B6BDA92E05B8F600D538B3 /* SentryLogLevelTests.swift in Sources */,
@@ -6191,6 +6219,7 @@
61916219
D45E2D772E003EBF0072A6B7 /* TestRedactOptions.swift in Sources */,
61926220
63FE720520DA66EC00CDBAE8 /* FileBasedTestCase.m in Sources */,
61936221
51B15F802BE88D510026A2F2 /* URLSessionTaskHelperTests.swift in Sources */,
6222+
D4AF7D262E9401EB004F0F59 /* SentryUIRedactBuilderTests+UIKit.swift in Sources */,
61946223
63EED6C32237989300E02400 /* SentryOptionsTest.m in Sources */,
61956224
7BBD18B22451804C00427C76 /* SentryRetryAfterHeaderParserTests.swift in Sources */,
61966225
7BD337E424A356180050DB6E /* SentryCrashIntegrationTests.swift in Sources */,
@@ -6203,6 +6232,7 @@
62036232
62F4DDA12C04CB9700588890 /* SentryBaggageSerializationTests.swift in Sources */,
62046233
7BE912AF272166DD00E49E62 /* SentryNoOpSpanTests.swift in Sources */,
62056234
D4F2B5352D0C69D500649E42 /* SentryCrashCTests.swift in Sources */,
6235+
D4AF7D2A2E940493004F0F59 /* SentryUIRedactBuilderTests.swift in Sources */,
62066236
7B56D73524616E5600B842DA /* SentryConcurrentRateLimitsDictionaryTests.swift in Sources */,
62076237
7B7D8730248648AD00D2ECFF /* SentryStacktraceBuilderTests.swift in Sources */,
62086238
FA21A2EF2E60E9CB00E7EADB /* EnvelopeComparison.swift in Sources */,
@@ -6316,6 +6346,7 @@
63166346
D80694C42B7CC9AE00B820E6 /* SentryReplayEventTests.swift in Sources */,
63176347
7B34721728086A9D0041F047 /* SentrySwizzleWrapperTests.swift in Sources */,
63186348
8EC4CF5025C3A0070093DEE9 /* SentrySpanContextTests.swift in Sources */,
6349+
D4AF7D282E9402AC004F0F59 /* SentryUIRedactBuilderTests+SpecialViews.swift in Sources */,
63196350
6281C5742D3E50DF009D0978 /* ArbitraryDataTests.swift in Sources */,
63206351
7BE0DC2F272ABAF6004FA8B7 /* SentryAutoBreadcrumbTrackingIntegrationTests.swift in Sources */,
63216352
7B869EBE249B964D004F4FDB /* SentryThreadEquality.swift in Sources */,
@@ -6399,6 +6430,7 @@
63996430
7B68D93625FF5F1A0082D139 /* SentryAppState+Equality.m in Sources */,
64006431
7B5CAF7E27F5AD3500ED0DB6 /* TestNSURLRequestBuilder.m in Sources */,
64016432
D467125E2DCCFF2500D4074A /* SentryReplayOptionsObjcTests.m in Sources */,
6433+
D4AF7D222E93FFCA004F0F59 /* SentryUIRedactBuilderTests+ReactNative.swift in Sources */,
64026434
7BF69E072987D1FE002EBCA4 /* SentryCrashDoctorTests.swift in Sources */,
64036435
7B4F22DC294089530067EA17 /* FormatHexAddress.swift in Sources */,
64046436
8EAC7FF8265C8910005B44E5 /* SentryTracerTests.swift in Sources */,
@@ -8948,6 +8980,25 @@
89488980
defaultConfigurationName = Release;
89498981
};
89508982
/* End XCConfigurationList section */
8983+
8984+
/* Begin XCRemoteSwiftPackageReference section */
8985+
D43C1BE62E8FB85400CD5D67 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {
8986+
isa = XCRemoteSwiftPackageReference;
8987+
repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing";
8988+
requirement = {
8989+
kind = upToNextMajorVersion;
8990+
minimumVersion = 1.18.7;
8991+
};
8992+
};
8993+
/* End XCRemoteSwiftPackageReference section */
8994+
8995+
/* Begin XCSwiftPackageProductDependency section */
8996+
D43C1BE72E8FB85400CD5D67 /* SnapshotTesting */ = {
8997+
isa = XCSwiftPackageProductDependency;
8998+
package = D43C1BE62E8FB85400CD5D67 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */;
8999+
productName = SnapshotTesting;
9000+
};
9001+
/* End XCSwiftPackageProductDependency section */
89519002
};
89529003
rootObject = 6327C5CA1EB8A783004E799B /* Project object */;
89539004
}

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)