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

feat: SwiftUI time for initial display and time for full display #4596

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
35 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
9f92dd8
Merge branch 'main' into feat/swiftui-ttid
brustolin Dec 5, 2024
d51b0ee
Update CHANGELOG.md
brustolin Dec 5, 2024
45623f3
Update SentryRedactModifierTests.swift
brustolin Dec 10, 2024
e572da7
Merge branch 'main' into feat/swiftui-ttid
brustolin Dec 12, 2024
331d1df
use onAppear
brustolin Dec 12, 2024
f1b6632
Format code
getsentry-bot Dec 12, 2024
6dc28e5
Update SentryTracedView.swift
brustolin Dec 12, 2024
588764e
fix test
brustolin Dec 12, 2024
15cfd35
Update Sources/Sentry/SentryUIViewControllerPerformanceTracker.m
brustolin Dec 13, 2024
edba1ba
Format code
getsentry-bot Dec 13, 2024
98e4c6e
refactoring
brustolin Dec 18, 2024
facf4a3
Format code
getsentry-bot Dec 18, 2024
d3bc4ca
move code to viewModel
brustolin Dec 18, 2024
036a741
Update SentryTracedView.swift
brustolin Dec 18, 2024
b4ddf12
Update SentryTracedView.swift
brustolin Dec 18, 2024
4c749b4
More change
brustolin Dec 19, 2024
25d4173
Merge branch 'main' into feat/swiftui-ttid
brustolin Dec 19, 2024
951bab7
Update test.yml
brustolin Dec 20, 2024
9f95dd8
Merge branch 'main' into feat/swiftui-ttid
brustolin Dec 20, 2024
c95d3ec
Update scripts/xcode-test.sh
brustolin Dec 20, 2024
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
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Features

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

### Improvements

- Improve compiler error message for missing Swift declarations due to APPLICATION_EXTENSION_API_ONLY (#4603)
Expand Down Expand Up @@ -32,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
Expand Up @@ -5,21 +5,17 @@ import SwiftUI
import XCTest

class SentryRedactModifierTests: XCTestCase {
brustolin marked this conversation as resolved.
Show resolved Hide resolved

func testViewMask() throws {
let text = Text("Hello, World!")
let redactedText = text.sentryReplayMask()

XCTAssertTrue(redactedText is ModifiedContent<Text, SentryReplayModifier>)
}

func testViewUnmask() throws {
let text = Text("Hello, World!")
let redactedText = text.sentryReplayUnmask()

XCTAssertTrue(redactedText is ModifiedContent<Text, SentryReplayModifier>)
}

}

#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
2 changes: 1 addition & 1 deletion SentryTestUtils/ClearTestState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 1 addition & 5 deletions Sources/Sentry/SentryHub.m
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,7 @@ - (BOOL)eventContainsOnlyHandledErrors:(NSDictionary *)eventDictionary
- (void)reportFullyDisplayed
{
#if SENTRY_HAS_UIKIT
if (_client.options.enableTimeToFullDisplayTracing) {
philprime marked this conversation as resolved.
Show resolved Hide resolved
[SentryUIViewControllerPerformanceTracker.shared reportFullyDisplayed];
} else {
SENTRY_LOG_DEBUG(@"The options `enableTimeToFullDisplay` is disabled.");
}
[SentryUIViewControllerPerformanceTracker.shared reportFullyDisplayed];
#endif // SENTRY_HAS_UIKIT
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryPerformanceTrackingIntegration.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ - (BOOL)installWithOptions:(SentryOptions *)options
binaryImageCache:[SentryDependencyContainer.sharedInstance binaryImageCache]];

[self.swizzling start];
SentryUIViewControllerPerformanceTracker.shared.enableWaitForFullDisplay
SentryUIViewControllerPerformanceTracker.shared.alwaysWaitForFullDisplay
= options.enableTimeToFullDisplayTracing;

return YES;
Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
[SentryDependencyContainer.sharedInstance.dispatchQueueWrapper dispatchAsyncWithBlock:^{
BOOL shouldStopAndTransmitLaunchProfile = options.profilesSampleRate != nil;
# if SENTRY_HAS_UIKIT
if (SentryUIViewControllerPerformanceTracker.shared.enableWaitForFullDisplay) {
if (SentryUIViewControllerPerformanceTracker.shared.alwaysWaitForFullDisplay) {
shouldStopAndTransmitLaunchProfile = NO;
}
# endif // SENTRY_HAS_UIKIT
Expand Down
Loading
Loading