Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't start the SDK inside Xcode preview #4601

Merged
merged 53 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a689d58
wip
brustolin Dec 2, 2024
fd905da
more changes
brustolin Dec 4, 2024
e024c6c
Update CHANGELOG.md
brustolin Dec 4, 2024
ec167f7
Merge branch 'main' into feat/swiftui-ttid
brustolin Dec 4, 2024
671956f
Format code
getsentry-bot Dec 4, 2024
5c531b6
Update CHANGELOG.md
brustolin Dec 4, 2024
6bedfa7
Merge branch 'feat/swiftui-ttid' of https://github.com/getsentry/sent…
brustolin Dec 4, 2024
e6c6f18
fix for macOS
brustolin Dec 4, 2024
d6884c5
fix tests
brustolin Dec 4, 2024
ebdbc79
Update SentryTracedView.swift
brustolin Dec 4, 2024
78e6b66
Format code
getsentry-bot Dec 4, 2024
04c6fdd
Update SentryTimeToDisplayTrackerTest.swift
brustolin Dec 4, 2024
818aa34
Format code
getsentry-bot Dec 4, 2024
6bbebc7
Update SentrySDKTests.swift
brustolin Dec 4, 2024
a970eb3
UITests
brustolin Dec 5, 2024
2cfffc2
Merge branch 'feat/swiftui-ttid' into feat/disableSDKSwiftUIPreview
brustolin Dec 5, 2024
1c67d50
Don't start the SDK inside Xcode preview
brustolin Dec 5, 2024
9f92dd8
Merge branch 'main' into feat/swiftui-ttid
brustolin Dec 5, 2024
87d86c4
Merge branch 'feat/swiftui-ttid' into feat/disableSDKSwiftUIPreview
brustolin Dec 5, 2024
b1c6742
Update CHANGELOG.md
brustolin Dec 5, 2024
75c7b2e
Update CHANGELOG.md
brustolin Dec 5, 2024
e7d17aa
Apply suggestions from code review
brustolin Dec 6, 2024
8d46d53
fix
brustolin Dec 6, 2024
57768ad
Update SentryRedactModifierTests.swift
brustolin Dec 6, 2024
e5cfc4b
extern
brustolin Dec 6, 2024
63f1ae7
Format code
getsentry-bot Dec 6, 2024
53af3e4
Update Sources/Sentry/SentrySDK.m
brustolin Dec 6, 2024
6f3d1de
Update Sources/Sentry/SentrySDK.m
brustolin Dec 6, 2024
c7917be
Use processInfoWrapper
brustolin Dec 10, 2024
a69f175
Merge branch 'feat/disableSDKSwiftUIPreview' of https://github.com/ge…
brustolin Dec 10, 2024
251078b
Format code
getsentry-bot Dec 10, 2024
9519161
Update ClearTestState.swift
brustolin Dec 10, 2024
6ffe9dc
Update SentryRedactModifierTests.swift
brustolin Dec 10, 2024
d2119ed
Update SentryInternal.h
brustolin Dec 10, 2024
611cd81
Apply suggestions from code review
brustolin Dec 12, 2024
e57e2bc
Format code
getsentry-bot Dec 12, 2024
14bdfa9
merge
brustolin Jan 20, 2025
b7aef45
Format code
getsentry-bot Jan 20, 2025
a5aa8b3
Wip
brustolin Jan 20, 2025
ad5acf6
Merge branch 'feat/disableSDKSwiftUIPreview' of https://github.com/ge…
brustolin Jan 20, 2025
1b0991f
wip
brustolin Jan 20, 2025
91a7f23
Update ContentView.swift
brustolin Jan 20, 2025
5c6e688
SDK Adjusts
brustolin Jan 20, 2025
b158b6d
Update SentryTimeToDisplayTracker.m
brustolin Jan 20, 2025
3aac9c6
Update SentryTimeToDisplayTracker.h
brustolin Jan 20, 2025
40e6629
Update SentryUIViewControllerPerformanceTracker.m
brustolin Jan 20, 2025
3a1a563
Update CHANGELOG.md
brustolin Jan 20, 2025
dcf0655
Update CHANGELOG.md
brustolin Jan 20, 2025
e8e0a7a
Format code
getsentry-bot Jan 20, 2025
c36a251
Update SentrySDK.m
brustolin Jan 20, 2025
a067cd1
Merge branch 'feat/disableSDKSwiftUIPreview' of https://github.com/ge…
brustolin Jan 20, 2025
1ed481a
Update SentryInternal.h
brustolin Jan 20, 2025
650a64b
Update SentrySwiftUI.h
brustolin Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## Unreleased

### Features

- SwiftUI time for initial display and time for full display (#4596)

### Fixes

- Don't start the SDK inside Xcode preview (#4601)

## 8.42.0-beta.2

### Fixes
Expand All @@ -26,7 +36,6 @@
- Load integration from same binary (#4541)
- Masking for fast animations #4574


### Improvements

- impr: Speed up getBinaryImages V2 (#4539). Follow up on (#4435)
Expand Down
8 changes: 8 additions & 0 deletions Samples/iOS-SwiftUI/iOS-SwiftUI-UITests/LaunchUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@ class LaunchUITests: XCTestCase {
formScreenNavigationBar/*@START_MENU_TOKEN@*/.buttons["Test"]/*[[".otherElements[\"Test\"].buttons[\"Test\"]",".buttons[\"Test\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
XCTAssertEqual(app.staticTexts["SPAN_ID"].label, "NO SPAN")
}

func testTTID_TTFD() {
let app = XCUIApplication()
app.launch()
app.buttons["Show TTD"].tap()

XCTAssertEqual(app.staticTexts["TTDInfo"].label, "TTID and TTFD found")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#if canImport(UIKit) && canImport(SwiftUI)
@testable import Sentry
@testable import SentrySwiftUI
import SwiftUI
import XCTest

class SentryRedactModifierTests: XCTestCase {
func testViewMask() throws {
let redactedText = Text("Hello, World!").sentryReplayMask()
let description = String(describing: redactedText)
XCTAssertTrue(description.starts(with: "AnyView(ModifiedContent<Text, SentryReplayModifier>"), "Redacted text is \(description)")

Check failure on line 11 in Samples/iOS-SwiftUI/iOS-SwiftUI-UITests/SentryRedactModifierTests.swift

View workflow job for this annotation

GitHub Actions / UI Tests for SwiftUI on iPhone 8 (16.1) Simulator

testViewMask, XCTAssertTrue failed - Redacted text is ModifiedContent<Text, SentryReplayModifier>(content: SwiftUI.Text(storage: SwiftUI.Text.Storage.anyTextStorage(<LocalizedTextStorage: 0x00006000009aea80>: "Hello, World!"), modifiers: []), modifier: SentrySwiftUI.SentryReplayModifier(behavior: SentrySwiftUI.MaskBehavior.mask))
}

func testViewUnmask() throws {
let unmaskedText = Text("Hello, World!").sentryReplayUnmask()
let description = String(describing: unmaskedText)
XCTAssertTrue(description.starts(with: "AnyView(ModifiedContent<Text, SentryReplayModifier>"), "Unmasked text is \(description)")

Check failure on line 17 in Samples/iOS-SwiftUI/iOS-SwiftUI-UITests/SentryRedactModifierTests.swift

View workflow job for this annotation

GitHub Actions / UI Tests for SwiftUI on iPhone 8 (16.1) Simulator

testViewUnmask, XCTAssertTrue failed - Unmasked text is ModifiedContent<Text, SentryReplayModifier>(content: SwiftUI.Text(storage: SwiftUI.Text.Storage.anyTextStorage(<LocalizedTextStorage: 0x00006000009b4230>: "Hello, World!"), modifiers: []), modifier: SentrySwiftUI.SentryReplayModifier(behavior: SentrySwiftUI.MaskBehavior.unmask))
}
}

#endif
19 changes: 19 additions & 0 deletions Samples/iOS-SwiftUI/iOS-SwiftUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
D8199DCE29376FD90074249E /* SentrySwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D8BBD38B2901AE400011F850 /* SentrySwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D832FAF02982A908007A9A5F /* FormScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D832FAEF2982A908007A9A5F /* FormScreen.swift */; };
D85388D12980222500B63908 /* UIKitScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85388D02980222500B63908 /* UIKitScreen.swift */; };
D8F0F3C02D0068A100826CE3 /* SentrySwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8BBD38B2901AE400011F850 /* SentrySwiftUI.framework */; };
D8F0F3C12D0068A100826CE3 /* SentrySwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D8BBD38B2901AE400011F850 /* SentrySwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D8F0F3C42D0068AB00826CE3 /* SentryRedactModifierTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F0F3C32D0068AB00826CE3 /* SentryRedactModifierTests.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -130,6 +133,17 @@
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
D8F0F3C22D0068A100826CE3 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
D8F0F3C12D0068A100826CE3 /* SentrySwiftUI.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -159,13 +173,15 @@
D8A22A7C2915231F006907D9 /* SentrySpanStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentrySpanStatus.h; sourceTree = "<group>"; };
D8A22A7D2915238A006907D9 /* SentryTracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryTracer.h; path = ../../../../Sources/Sentry/include/SentryTracer.h; sourceTree = "<group>"; };
D8A22A7E2915238A006907D9 /* SentryPerformanceTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryPerformanceTracker.h; path = ../../../../Sources/Sentry/include/SentryPerformanceTracker.h; sourceTree = "<group>"; };
D8F0F3C32D0068AB00826CE3 /* SentryRedactModifierTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRedactModifierTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
7B64385426A6C0A6000D0F65 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D8F0F3C02D0068A100826CE3 /* SentrySwiftUI.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -198,6 +214,7 @@
isa = PBXGroup;
children = (
7B64385926A6C0A6000D0F65 /* LaunchUITests.swift */,
D8F0F3C32D0068AB00826CE3 /* SentryRedactModifierTests.swift */,
7B64385B26A6C0A6000D0F65 /* Info.plist */,
);
path = "iOS-SwiftUI-UITests";
Expand Down Expand Up @@ -306,6 +323,7 @@
7B64385326A6C0A6000D0F65 /* Sources */,
7B64385426A6C0A6000D0F65 /* Frameworks */,
7B64385526A6C0A6000D0F65 /* Resources */,
D8F0F3C22D0068A100826CE3 /* Embed Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -535,6 +553,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D8F0F3C42D0068AB00826CE3 /* SentryRedactModifierTests.swift in Sources */,
7B64385A26A6C0A6000D0F65 /* LaunchUITests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
39 changes: 36 additions & 3 deletions Samples/iOS-SwiftUI/iOS-SwiftUI/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class DataBag {

struct ContentView: View {

@State var TTDInfo: String = ""

var addBreadcrumbAction: () -> Void = {
let crumb = Breadcrumb(level: SentryLevel.info, category: "Debug")
crumb.message = "tapped addBreadcrumb"
Expand Down Expand Up @@ -89,12 +91,34 @@ struct ContentView: View {
}
}

func showTTD() {
guard let tracer = getCurrentTracer() else { return }

var log = [String]()

if !hasTTID(tracer: tracer) { log.append("TTID not found") }
if !hasTTFD(tracer: tracer) { log.append("TTFD not found") }

if log.isEmpty {
log.append("TTID and TTFD found")
}
TTDInfo = log.joined(separator: "\n")
}

func getCurrentTracer() -> SentryTracer? {
if DataBag.shared.info["initialTransaction"] == nil {
DataBag.shared.info["initialTransaction"] = SentrySDK.span as? SentryTracer
}
return DataBag.shared.info["initialTransaction"] as? SentryTracer
}

func hasTTID(tracer: SentryTracer?) -> Bool {
tracer?.children.contains { $0.spanDescription?.contains("initial display") == true } == true
}

func hasTTFD(tracer: SentryTracer?) -> Bool {
tracer?.children.contains { $0.spanDescription?.contains("full display") == true } == true
}

func getCurrentSpan() -> Span? {

Expand All @@ -115,19 +139,22 @@ struct ContentView: View {
}

var body: some View {
return SentryTracedView("Content View Body") {
NavigationView {
return SentryTracedView("Content View Body", waitForFullDisplay: true) { NavigationView {
VStack(alignment: HorizontalAlignment.center, spacing: 16) {
Group {
Text(getCurrentTracer()?.transactionContext.name ?? "NO SPAN")
.accessibilityIdentifier("TRANSACTION_NAME")

Text(getCurrentTracer()?.transactionContext.spanId.sentrySpanIdString ?? "NO ID")
.accessibilityIdentifier("TRANSACTION_ID")
.sentryReplayMask()

Text(getCurrentTracer()?.transactionContext.origin ?? "NO ORIGIN")
.accessibilityIdentifier("TRACE_ORIGIN")
}.sentryReplayUnmask()
.onAppear {
SentrySDK.reportFullyDisplayed()
}
SentryTracedView("Child Span") {
VStack {
Text(getCurrentSpan()?.spanDescription ?? "NO SPAN")
Expand Down Expand Up @@ -165,6 +192,9 @@ struct ContentView: View {
Button(action: captureTransactionAction) {
Text("Capture Transaction")
}
Button(action: showTTD) {
Text("Show TTD")
}
}
VStack(spacing: 16) {
Button(action: {
Expand Down Expand Up @@ -204,8 +234,11 @@ struct ContentView: View {
.background(Color.white)
}
SecondView()

Text(TTDInfo)
.accessibilityIdentifier("TTDInfo")
}
}
}
}
}
}
Expand Down
33 changes: 4 additions & 29 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,6 @@
D84F833E2A1CC401005828E0 /* SentrySwiftAsyncIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = D84F833C2A1CC401005828E0 /* SentrySwiftAsyncIntegration.m */; };
D851527F2C9971020070F669 /* SentryStringUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = D851527E2C9971020070F669 /* SentryStringUtils.h */; };
D85152832C997A280070F669 /* SentryStringUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85152822C997A1F0070F669 /* SentryStringUtils.swift */; };
D85153002CA2B5F60070F669 /* SentrySwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8199DAA29376E9B0074249E /* SentrySwiftUI.framework */; };
D85153012CA2B5F60070F669 /* SentrySwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D8199DAA29376E9B0074249E /* SentrySwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D851530C2CA2B7B00070F669 /* SentryRedactModifierTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D851530B2CA2B7A30070F669 /* SentryRedactModifierTests.swift */; };
D85596F3280580F10041FF8B /* SentryScreenshotIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = D85596F1280580F10041FF8B /* SentryScreenshotIntegration.m */; };
D855AD62286ED6A4002573E1 /* SentryCrashTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D855AD61286ED6A4002573E1 /* SentryCrashTests.m */; };
D855B3E827D652AF00BCED76 /* SentryCoreDataTrackingIntegrationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D855B3E727D652AF00BCED76 /* SentryCoreDataTrackingIntegrationTest.swift */; };
Expand Down Expand Up @@ -928,6 +925,7 @@
D8DBE0D22C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8DBE0D12C0EFFC300FAB1FD /* SentryReplayOptionsTests.swift */; };
D8F016B32B9622D6007B9AFB /* SentryId.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F016B22B9622D6007B9AFB /* SentryId.swift */; };
D8F016B62B962548007B9AFB /* StringExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F016B52B962548007B9AFB /* StringExtensions.swift */; };
D8F0F3B72D005B0400826CE3 /* TracingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F0F3B62D005AFB00826CE3 /* TracingView.swift */; };
D8F67AEE2BE0D19200C9197B /* UIImageHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AED2BE0D19200C9197B /* UIImageHelper.swift */; };
D8F67AF12BE0D33F00C9197B /* UIImageHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */; };
D8F67AF42BE10F9600C9197B /* UIRedactBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F67AF22BE10F7600C9197B /* UIRedactBuilderTests.swift */; };
Expand Down Expand Up @@ -977,13 +975,6 @@
remoteGlobalIDString = D84DAD4C2B17428D003CF120;
remoteInfo = SentryTestUtilsDynamic;
};
D85153022CA2B5F60070F669 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6327C5CA1EB8A783004E799B /* Project object */;
proxyType = 1;
remoteGlobalIDString = D8199DA929376E9B0074249E;
remoteInfo = SentrySwiftUI;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -994,7 +985,6 @@
dstSubfolderSpec = 10;
files = (
D84DAD5A2B1742C1003CF120 /* SentryTestUtilsDynamic.framework in Embed Frameworks */,
D85153012CA2B5F60070F669 /* SentrySwiftUI.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1909,7 +1899,6 @@
D8511F722BAC8F750015E6FD /* Sentry.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = Sentry.modulemap; sourceTree = "<group>"; };
D851527E2C9971020070F669 /* SentryStringUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryStringUtils.h; sourceTree = "<group>"; };
D85152822C997A1F0070F669 /* SentryStringUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryStringUtils.swift; sourceTree = "<group>"; };
D851530B2CA2B7A30070F669 /* SentryRedactModifierTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRedactModifierTests.swift; sourceTree = "<group>"; };
D85596F1280580F10041FF8B /* SentryScreenshotIntegration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryScreenshotIntegration.m; sourceTree = "<group>"; };
D855AD61286ED6A4002573E1 /* SentryCrashTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryCrashTests.m; sourceTree = "<group>"; };
D855B3E727D652AF00BCED76 /* SentryCoreDataTrackingIntegrationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCoreDataTrackingIntegrationTest.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2019,6 +2008,7 @@
D8F016B52B962548007B9AFB /* StringExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringExtensions.swift; sourceTree = "<group>"; };
D8F01DE42A126B62008F4996 /* HybridPod.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = HybridPod.podspec; sourceTree = "<group>"; };
D8F01DE52A126BF5008F4996 /* HybridTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HybridTest.swift; sourceTree = "<group>"; };
D8F0F3B62D005AFB00826CE3 /* TracingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TracingView.swift; sourceTree = "<group>"; };
D8F67AED2BE0D19200C9197B /* UIImageHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelper.swift; sourceTree = "<group>"; };
D8F67AEF2BE0D31A00C9197B /* UIImageHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageHelperTests.swift; sourceTree = "<group>"; };
D8F67AF22BE10F7600C9197B /* UIRedactBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIRedactBuilderTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2050,7 +2040,6 @@
8431F01C29B2854200D8DC56 /* libSentryTestUtils.a in Frameworks */,
D84DAD592B1742C1003CF120 /* SentryTestUtilsDynamic.framework in Frameworks */,
63AA766A1EB8CB2F00D153DE /* Sentry.framework in Frameworks */,
D85153002CA2B5F60070F669 /* SentrySwiftUI.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -2546,7 +2535,6 @@
7BF536D224BEF240004FA6A2 /* TestUtils */,
D81FDF0F280E9FEC0045E0E4 /* Tools */,
7B6C5ED4264E62B60010D138 /* Transaction */,
D851530A2CA2B7960070F669 /* SwiftUI */,
);
path = SentryTests;
sourceTree = "<group>";
Expand Down Expand Up @@ -3690,6 +3678,7 @@
D8199DB529376ECC0074249E /* SentrySwiftUI.h */,
D88D25E92B8E0BAC0073C3D5 /* module.modulemap */,
D8199DB629376ECC0074249E /* SentryTracedView.swift */,
D8F0F3B62D005AFB00826CE3 /* TracingView.swift */,
D8A65B5C2C98656000974B74 /* SentryReplayView.swift */,
);
path = SentrySwiftUI;
Expand Down Expand Up @@ -3734,14 +3723,6 @@
path = SentryTestUtilsDynamic;
sourceTree = "<group>";
};
D851530A2CA2B7960070F669 /* SwiftUI */ = {
isa = PBXGroup;
children = (
D851530B2CA2B7A30070F669 /* SentryRedactModifierTests.swift */,
);
path = SwiftUI;
sourceTree = "<group>";
};
D85596EF280580BE0041FF8B /* Screenshot */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4346,7 +4327,6 @@
dependencies = (
63AA766C1EB8CB2F00D153DE /* PBXTargetDependency */,
D84DAD5C2B1742C1003CF120 /* PBXTargetDependency */,
D85153032CA2B5F60070F669 /* PBXTargetDependency */,
);
name = SentryTests;
packageProductDependencies = (
Expand Down Expand Up @@ -5046,7 +5026,6 @@
D8AE48C12C57B1550092A2A6 /* SentryLevelTests.swift in Sources */,
63FE721820DA66EC00CDBAE8 /* TestThread.m in Sources */,
7B4D308A26FC616B00C94DE9 /* SentryHttpTransportTests.swift in Sources */,
D851530C2CA2B7B00070F669 /* SentryRedactModifierTests.swift in Sources */,
7B4E23B6251A07BD00060D68 /* SentryDispatchQueueWrapperTests.swift in Sources */,
63FE720720DA66EC00CDBAE8 /* SentryCrashReportFilter_Tests.m in Sources */,
8F73BC312B02B87E00C3CEF4 /* SentryInstallationTests.swift in Sources */,
Expand Down Expand Up @@ -5173,6 +5152,7 @@
files = (
D8199DC129376EEC0074249E /* SentryTracedView.swift in Sources */,
D8199DBF29376EE20074249E /* SentryInternal.m in Sources */,
D8F0F3B72D005B0400826CE3 /* TracingView.swift in Sources */,
D8A65B5D2C98656800974B74 /* SentryReplayView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -5213,11 +5193,6 @@
target = D84DAD4C2B17428D003CF120 /* SentryTestUtilsDynamic */;
targetProxy = D84DAD5B2B1742C1003CF120 /* PBXContainerItemProxy */;
};
D85153032CA2B5F60070F669 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D8199DA929376E9B0074249E /* SentrySwiftUI */;
targetProxy = D85153022CA2B5F60070F669 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
Expand Down
4 changes: 2 additions & 2 deletions SentryTestUtils/ClearTestState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestCleanup: NSObject {
// You must call clearTestState on the main thread. Calling it on a background thread
// could interfere with another currently running test, making the tests flaky.
assert(Thread.isMainThread, "You must call clearTestState on the main thread.")

SentrySDK.processInfoEnvironment = [:]
SentrySDK.close()
SentrySDK.setCurrentHub(nil)
SentrySDK.crashedLastRunCalled = false
Expand All @@ -37,7 +37,7 @@ class TestCleanup: NSObject {

setenv("ActivePrewarm", "0", 1)
SentryAppStartTracker.load()
SentryUIViewControllerPerformanceTracker.shared.enableWaitForFullDisplay = false
SentryUIViewControllerPerformanceTracker.shared.alwaysWaitForFullDisplay = false
SentryDependencyContainer.sharedInstance().swizzleWrapper.removeAllCallbacks()
SentryDependencyContainer.sharedInstance().fileManager.clearDiskState()

Expand Down
Loading
Loading