Skip to content

Commit d174cc2

Browse files
committed
ref
1 parent 0acc37a commit d174cc2

6 files changed

Lines changed: 19 additions & 191 deletions

File tree

Samples/iOS-SwiftUI/iOS-SwiftUI/ContentView.swift

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import SwiftUI
44

55
//This is for test purpose
66
class DataBag {
7-
7+
88
static let shared = DataBag()
9-
9+
1010
var info = [String: Any]()
11-
11+
1212
private init() {
1313
}
1414
}
1515

1616
struct ContentView: View {
17-
17+
1818
@State var TTDInfo: String = ""
1919

2020
var addBreadcrumbAction: () -> Void = {
@@ -90,7 +90,7 @@ struct ContentView: View {
9090
}
9191
}
9292
}
93-
93+
9494
func showTTD() {
9595
guard let tracer = getCurrentTracer() else { return }
9696

@@ -119,33 +119,33 @@ struct ContentView: View {
119119
func hasTTFD(tracer: SentryTracer?) -> Bool {
120120
tracer?.children.contains { $0.spanDescription?.contains("full display") == true } == true
121121
}
122-
122+
123123
func getCurrentSpan() -> Span? {
124-
124+
125125
let tracker = SentryPerformanceTracker.shared
126126
guard let currentSpanId = tracker.activeSpanId() else {
127127
return DataBag.shared.info["lastSpan"] as? Span
128128
}
129-
129+
130130
if DataBag.shared.info["lastSpan"] == nil {
131131
let span = tracker.getSpan(currentSpanId)
132-
132+
133133
if !(span is SentryTracer) {
134134
DataBag.shared.info["lastSpan"] = span
135135
}
136136
}
137-
137+
138138
return DataBag.shared.info["lastSpan"] as? Span
139139
}
140-
140+
141141
var body: some View {
142142
return SentryTracedView("Content View Body", waitForFullDisplay: true) {
143143
NavigationView {
144144
VStack(alignment: HorizontalAlignment.center, spacing: 16) {
145145
Group {
146146
Text(getCurrentTracer()?.transactionContext.name ?? "NO SPAN")
147147
.accessibilityIdentifier("TRANSACTION_NAME")
148-
148+
149149
Text(getCurrentTracer()?.transactionContext.spanId.sentrySpanIdString ?? "NO ID")
150150
.accessibilityIdentifier("TRANSACTION_ID")
151151
.sentryReplayMask()
@@ -169,27 +169,27 @@ struct ContentView: View {
169169
}
170170
HStack (spacing: 30) {
171171
VStack(spacing: 16) {
172-
172+
173173
Button(action: addBreadcrumbAction) {
174174
Text("Add Breadcrumb")
175175
}
176-
176+
177177
Button(action: captureMessageAction) {
178178
Text("Capture Message")
179179
}
180-
180+
181181
Button(action: captureUserFeedbackAction) {
182182
Text("Capture User Feedback")
183183
}
184-
184+
185185
Button(action: captureErrorAction) {
186186
Text("Capture Error")
187187
}
188-
188+
189189
Button(action: captureNSExceptionAction) {
190190
Text("Capture NSException")
191191
}
192-
192+
193193
Button(action: captureTransactionAction) {
194194
Text("Capture Transaction")
195195
}
@@ -235,19 +235,13 @@ struct ContentView: View {
235235
.background(Color.white)
236236
}
237237
SecondView()
238-
238+
239239
Text(TTDInfo)
240240
.accessibilityIdentifier("TTDInfo")
241-
242-
TextField("DAE", text: $dae)
243-
.background(Color.red)
244-
TextField("Ola", text: $dae).sentryReplayUnmask()
245241
}
246242
}
247243
}
248244
}
249-
250-
@State var dae: String = ""
251245
}
252246

253247
struct SecondView: View {
@@ -261,6 +255,5 @@ struct SecondView: View {
261255
struct ContentView_Previews: PreviewProvider {
262256
static var previews: some View {
263257
ContentView()
264-
.sentryReplayPreviewMask(opacity: 0.3)
265258
}
266259
}

Sentry.xcodeproj/project.pbxproj

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -874,9 +874,6 @@
874874
D867063F27C3BC2400048851 /* SentryCoreDataTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = D867063C27C3BC2400048851 /* SentryCoreDataTracker.h */; };
875875
D86B6835294348A400B8B1FC /* SentryAttachment+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = D86B6834294348A400B8B1FC /* SentryAttachment+Private.h */; };
876876
D86F419827C8FEFA00490520 /* SentryCoreDataTrackerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D86F419727C8FEFA00490520 /* SentryCoreDataTrackerExtension.swift */; };
877-
D8709AC42D3E9C63006C491E /* SentryReplayMaskPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8709AC32D3E9C5C006C491E /* SentryReplayMaskPreview.swift */; };
878-
D8709ACB2D3F848E006C491E /* SentryReplayMaskPreviewUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8709ACA2D3F8480006C491E /* SentryReplayMaskPreviewUIView.swift */; };
879-
D8709ACD2D3F84CF006C491E /* PreviewRedactOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8709ACC2D3F84C9006C491E /* PreviewRedactOptions.swift */; };
880877
D8739CF32BECF70F007D2F66 /* SentryLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8739CF22BECF70F007D2F66 /* SentryLevel.swift */; };
881878
D8739CF92BECFFB5007D2F66 /* SentryTransactionNameSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8739CF82BECFFB5007D2F66 /* SentryTransactionNameSource.swift */; };
882879
D8739D142BEE5049007D2F66 /* SentryRRWebSpanEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8739D132BEE5049007D2F66 /* SentryRRWebSpanEvent.swift */; };
@@ -1988,9 +1985,6 @@
19881985
D86B6820293F39E000B8B1FC /* TestSentryViewHierarchy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestSentryViewHierarchy.h; sourceTree = "<group>"; };
19891986
D86B6834294348A400B8B1FC /* SentryAttachment+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryAttachment+Private.h"; path = "include/SentryAttachment+Private.h"; sourceTree = "<group>"; };
19901987
D86F419727C8FEFA00490520 /* SentryCoreDataTrackerExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCoreDataTrackerExtension.swift; sourceTree = "<group>"; };
1991-
D8709AC32D3E9C5C006C491E /* SentryReplayMaskPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryReplayMaskPreview.swift; sourceTree = "<group>"; };
1992-
D8709ACA2D3F8480006C491E /* SentryReplayMaskPreviewUIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryReplayMaskPreviewUIView.swift; sourceTree = "<group>"; };
1993-
D8709ACC2D3F84C9006C491E /* PreviewRedactOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewRedactOptions.swift; sourceTree = "<group>"; };
19941988
D8739CF22BECF70F007D2F66 /* SentryLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryLevel.swift; sourceTree = "<group>"; };
19951989
D8739CF82BECFFB5007D2F66 /* SentryTransactionNameSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryTransactionNameSource.swift; sourceTree = "<group>"; };
19961990
D8739D132BEE5049007D2F66 /* SentryRRWebSpanEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryRRWebSpanEvent.swift; sourceTree = "<group>"; };
@@ -3785,7 +3779,6 @@
37853779
isa = PBXGroup;
37863780
children = (
37873781
D8199DB429376ECC0074249E /* SentryInternal */,
3788-
D8709AC92D3F83A6006C491E /* Preview */,
37893782
D8199DB529376ECC0074249E /* SentrySwiftUI.h */,
37903783
D88D25E92B8E0BAC0073C3D5 /* module.modulemap */,
37913784
D8199DB629376ECC0074249E /* SentryTracedView.swift */,
@@ -3883,16 +3876,6 @@
38833876
name = CoreData;
38843877
sourceTree = "<group>";
38853878
};
3886-
D8709AC92D3F83A6006C491E /* Preview */ = {
3887-
isa = PBXGroup;
3888-
children = (
3889-
D8709ACA2D3F8480006C491E /* SentryReplayMaskPreviewUIView.swift */,
3890-
D8709AC32D3E9C5C006C491E /* SentryReplayMaskPreview.swift */,
3891-
D8709ACC2D3F84C9006C491E /* PreviewRedactOptions.swift */,
3892-
);
3893-
path = Preview;
3894-
sourceTree = "<group>";
3895-
};
38963879
D8739CF62BECFF86007D2F66 /* Log */ = {
38973880
isa = PBXGroup;
38983881
children = (
@@ -5340,10 +5323,7 @@
53405323
isa = PBXSourcesBuildPhase;
53415324
buildActionMask = 2147483647;
53425325
files = (
5343-
D8709AC42D3E9C63006C491E /* SentryReplayMaskPreview.swift in Sources */,
53445326
D8199DC129376EEC0074249E /* SentryTracedView.swift in Sources */,
5345-
D8709ACD2D3F84CF006C491E /* PreviewRedactOptions.swift in Sources */,
5346-
D8709ACB2D3F848E006C491E /* SentryReplayMaskPreviewUIView.swift in Sources */,
53475327
D48E8B9D2D3E82AC0032E35E /* SentrySpanOperation.swift in Sources */,
53485328
D8199DBF29376EE20074249E /* SentryInternal.m in Sources */,
53495329
D48E8B8B2D3E79610032E35E /* SentryTraceOrigin.swift in Sources */,

Sources/SentrySwiftUI/Preview/PreviewRedactOptions.swift

Lines changed: 0 additions & 18 deletions
This file was deleted.

Sources/SentrySwiftUI/Preview/SentryReplayMaskPreview.swift

Lines changed: 0 additions & 41 deletions
This file was deleted.

Sources/SentrySwiftUI/Preview/SentryReplayMaskPreviewUIView.swift

Lines changed: 0 additions & 84 deletions
This file was deleted.

Sources/SentrySwiftUI/SentryInternal/SentryInternal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424

2525
NS_ASSUME_NONNULL_BEGIN
2626

27-
extern NSString *const SENTRY_XCODE_PREVIEW_ENVIRONMENT_KEY;
28-
2927
typedef NS_ENUM(NSInteger, SentryTransactionNameSource);
3028

3129
@class SentrySpanId;

0 commit comments

Comments
 (0)