Skip to content

Commit 06a9389

Browse files
authored
ref: Remove user feedback (#6319)
1 parent 0dd7283 commit 06a9389

33 files changed

+146
-661
lines changed

Samples/iOS-ObjectiveC/iOS-ObjectiveC/ViewController.m

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,6 @@ - (IBAction)captureMessage:(id)sender
6262
NSLog(@"%@", eventId);
6363
}
6464

65-
- (IBAction)captureUserFeedback:(id)sender
66-
{
67-
NSError *error =
68-
[[NSError alloc] initWithDomain:@"UserFeedbackErrorDomain"
69-
code:0
70-
userInfo:@{ NSLocalizedDescriptionKey : @"This never happens." }];
71-
SentryId *eventId = [SentrySDK
72-
captureError:error
73-
withScopeBlock:^(SentryScope *_Nonnull scope) { [scope setLevel:kSentryLevelFatal]; }];
74-
75-
#if SDK_V9
76-
NSLog(@"SDK V9 does not support user feedback.");
77-
#else
78-
# pragma clang diagnostic push
79-
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
80-
SentryUserFeedback *userFeedback = [[SentryUserFeedback alloc] initWithEventId:eventId];
81-
# pragma clang diagnostic pop
82-
userFeedback.comments = @"It broke on iOS-ObjectiveC. I don't know why, but this happens.";
83-
userFeedback.email = @"[email protected]";
84-
userFeedback.name = @"John Me";
85-
# pragma clang diagnostic push
86-
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
87-
[SentrySDK captureUserFeedback:userFeedback];
88-
# pragma clang diagnostic pop
89-
#endif // SDK_V9
90-
}
91-
9265
- (IBAction)captureUserFeedbackV2:(id)sender
9366
{
9467
NSData *data = [NSData dataWithContentsOfURL:BundleResourceProvider.screenshotURL];

Samples/iOS-Swift/iOS-Swift/Base.lproj/Main.storyboard

Lines changed: 115 additions & 123 deletions
Large diffs are not rendered by default.

Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -213,25 +213,6 @@ class ExtraViewController: UIViewController {
213213
let feedback = SentryFeedback(message: "It broke again on iOS-Swift. I don't know why, but this happens.", name: "John Me", email: "[email protected]", source: .custom, associatedEventId: errorEventID, attachments: attachments)
214214
SentrySDK.capture(feedback: feedback)
215215
}
216-
217-
@IBAction func captureUserFeedback(_ sender: UIButton) {
218-
highlightButton(sender)
219-
let error = NSError(domain: "UserFeedbackErrorDomain", code: 0, userInfo: [NSLocalizedDescriptionKey: "This never happens."])
220-
221-
let eventId = SentrySDK.capture(error: error) { scope in
222-
scope.setLevel(.fatal)
223-
}
224-
225-
#if SDK_V9
226-
print("SDK V9 does not support user feedback.")
227-
#else
228-
let userFeedback = UserFeedback(eventId: eventId)
229-
userFeedback.comments = "It broke on iOS-Swift. I don't know why, but this happens."
230-
userFeedback.email = "[email protected]"
231-
userFeedback.name = "John Me"
232-
SentrySDK.capture(userFeedback: userFeedback)
233-
#endif // SDK_V9
234-
}
235216

236217
@IBAction func permissions(_ sender: UIButton) {
237218
highlightButton(sender)

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

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,6 @@ struct ContentView: View {
2929
SentrySDK.capture(message: "Yeah captured a message")
3030
}
3131

32-
var captureUserFeedbackAction: () -> Void = {
33-
let error = NSError(domain: "UserFeedbackErrorDomain", code: 0, userInfo: [NSLocalizedDescriptionKey: "This never happens."])
34-
35-
let eventId = SentrySDK.capture(error: error) { scope in
36-
scope.setLevel(.fatal)
37-
}
38-
39-
#if SDK_V9
40-
print("SDK V9 does not support user feedback.")
41-
#else
42-
let userFeedback = UserFeedback(eventId: eventId)
43-
userFeedback.comments = "It broke on tvOS-Swift. I don't know why, but this happens."
44-
userFeedback.email = "[email protected]"
45-
userFeedback.name = "John Me"
46-
SentrySDK.capture(userFeedback: userFeedback)
47-
#endif // SDK_V9
48-
}
49-
5032
func captureErrorAction() {
5133
let error = NSError(domain: "SampleErrorDomain", code: 1, userInfo: [NSLocalizedDescriptionKey: "Object does not exist"])
5234
errorId = SentrySDK.capture(error: error) { (scope) in
@@ -183,10 +165,6 @@ struct ContentView: View {
183165
Text("Capture Message")
184166
}
185167

186-
Button(action: captureUserFeedbackAction) {
187-
Text("Capture User Feedback")
188-
}
189-
190168
Button(action: captureErrorAction) {
191169
Text("Capture Error")
192170
}

Samples/macOS-Swift/Shared/Base.lproj/Main.storyboard

Lines changed: 29 additions & 42 deletions
Large diffs are not rendered by default.

Samples/macOS-Swift/Shared/ViewController.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,6 @@ class ViewController: NSViewController {
3737
SentrySDK.capture(exception: exception, scope: scope)
3838
}
3939

40-
@IBAction func captureUserFeedback(_ sender: Any) {
41-
let error = NSError(domain: "UserFeedbackErrorDomain", code: 0, userInfo: [NSLocalizedDescriptionKey: "This never happens."])
42-
43-
let eventId = SentrySDK.capture(error: error) { scope in
44-
scope.setLevel(.fatal)
45-
}
46-
47-
#if SDK_V9
48-
print("SDK V9 does not support user feedback.")
49-
#else
50-
let userFeedback = UserFeedback(eventId: eventId)
51-
userFeedback.comments = "It broke on macOS-Swift. I don't know why, but this happens."
52-
userFeedback.email = "[email protected]"
53-
userFeedback.name = "John Me"
54-
SentrySDK.capture(userFeedback: userFeedback)
55-
#endif // SDK_V9
56-
}
57-
5840
@IBAction func raiseNSException(_ sender: Any) {
5941
let userInfo: [String: String] = ["user-info-key-1": "user-info-value-1", "user-info-key-2": "user-info-value-2"]
6042
let exception = NSException(name: NSExceptionName("NSException via NSException raise"), reason: "Raised NSException", userInfo: userInfo)

Samples/tvOS-Swift/tvOS-Swift/ContentView.swift

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,6 @@ struct ContentView: View {
2727
SentrySDK.capture(message: "Yeah captured a message")
2828
}
2929

30-
var captureUserFeedbackAction: () -> Void = {
31-
let error = NSError(domain: "UserFeedbackErrorDomain", code: 0, userInfo: [NSLocalizedDescriptionKey: "This never happens."])
32-
33-
let eventId = SentrySDK.capture(error: error) { scope in
34-
scope.setLevel(.fatal)
35-
}
36-
37-
#if SDK_V9
38-
print("SDK V9 does not support user feedback.")
39-
#else
40-
let userFeedback = UserFeedback(eventId: eventId)
41-
userFeedback.comments = "It broke on tvOS-Swift. I don't know why, but this happens."
42-
userFeedback.email = "[email protected]"
43-
userFeedback.name = "John Me"
44-
SentrySDK.capture(userFeedback: userFeedback)
45-
#endif // SDK_V9
46-
}
47-
4830
var captureErrorAction: () -> Void = {
4931
let error = NSError(domain: "SampleErrorDomain", code: 1, userInfo: [NSLocalizedDescriptionKey: "Object does not exist"])
5032
SentrySDK.capture(error: error) { (scope) in
@@ -121,10 +103,6 @@ struct ContentView: View {
121103
}
122104
.accessibility(identifier: "captureMessageButton")
123105

124-
Button(action: captureUserFeedbackAction) {
125-
Text("Capture User Feedback")
126-
}
127-
128106
Button(action: captureErrorAction) {
129107
Text("Capture Error")
130108
}

Samples/visionOS-Swift/visionOS-Swift/ContentView.swift

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,6 @@ struct ContentView: View {
1616
SentrySDK.capture(message: "Yeah captured a message")
1717
}
1818

19-
var captureUserFeedbackAction: () -> Void = {
20-
let error = NSError(domain: "UserFeedbackErrorDomain", code: 0, userInfo: [NSLocalizedDescriptionKey: "This never happens."])
21-
22-
let eventId = SentrySDK.capture(error: error) { scope in
23-
scope.setLevel(.fatal)
24-
}
25-
26-
#if SDK_V9
27-
print("SDK V9 does not support user feedback.")
28-
#else
29-
let userFeedback = UserFeedback(eventId: eventId)
30-
userFeedback.comments = "It broke on visionOS-Swift. I don't know why, but this happens."
31-
userFeedback.email = "[email protected]"
32-
userFeedback.name = "John Me"
33-
SentrySDK.capture(userFeedback: userFeedback)
34-
#endif // SDK_V9
35-
}
36-
3719
var captureErrorAction: () -> Void = {
3820
let error = NSError(domain: "SampleErrorDomain", code: 1, userInfo: [NSLocalizedDescriptionKey: "Object does not exist"])
3921
SentrySDK.capture(error: error) { (scope) in
@@ -113,10 +95,6 @@ struct ContentView: View {
11395
}
11496
.accessibility(identifier: "captureMessageButton")
11597

116-
Button(action: captureUserFeedbackAction) {
117-
Text("Capture User Feedback")
118-
}
119-
12098
Button(action: captureErrorAction) {
12199
Text("Capture Error")
122100
}

0 commit comments

Comments
 (0)