-
-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,11 +71,14 @@ - (IBAction)captureUserFeedback:(id)sender | |
captureError:error | ||
withScopeBlock:^(SentryScope *_Nonnull scope) { [scope setLevel:kSentryLevelFatal]; }]; | ||
|
||
SentryUserFeedback *userFeedback = [[SentryUserFeedback alloc] initWithEventId:eventId]; | ||
userFeedback.comments = @"It broke on iOS-ObjectiveC. I don't know why, but this happens."; | ||
userFeedback.email = @"[email protected]"; | ||
userFeedback.name = @"John Me"; | ||
[SentrySDK captureUserFeedback:userFeedback]; | ||
SentryFeedback *feedback = [[SentryFeedback alloc] | ||
initWithMessage:@"It broke on iOS-ObjectiveC. I don't know why, but this happens." | ||
name:@"John Me" | ||
email:@"[email protected]" | ||
source:SentryFeedbackSourceCustom | ||
associatedEventId:nil | ||
screenshot:nil]; | ||
[SentrySDK captureUserFeedback:feedback]; | ||
} | ||
|
||
- (IBAction)captureError:(id)sender | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,17 +143,8 @@ class ExtraViewController: UIViewController { | |
|
||
@IBAction func captureUserFeedback(_ sender: UIButton) { | ||
highlightButton(sender) | ||
let error = NSError(domain: "UserFeedbackErrorDomain", code: 0, userInfo: [NSLocalizedDescriptionKey: "This never happens."]) | ||
|
||
let eventId = SentrySDK.capture(error: error) { scope in | ||
scope.setLevel(.fatal) | ||
} | ||
|
||
let userFeedback = UserFeedback(eventId: eventId) | ||
userFeedback.comments = "It broke on iOS-Swift. I don't know why, but this happens." | ||
userFeedback.email = "[email protected]" | ||
userFeedback.name = "John Me" | ||
SentrySDK.capture(userFeedback: userFeedback) | ||
let feedback = SentryFeedback(message: "It broke on iOS-Swift. I don't know why, but this happens.", name: "John Me", email: "[email protected]", source: .custom, associatedEventId: nil, screenshot: nil) | ||
Check failure on line 146 in Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift
|
||
SentrySDK.capture(userFeedback: feedback) | ||
} | ||
|
||
@IBAction func permissions(_ sender: UIButton) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,12 @@ import UIKit | |
public class SentryUserFeedbackFormConfiguration: NSObject { | ||
// MARK: General settings | ||
|
||
/** | ||
* Sets the email and name field text content to `SentryUser.email` and `SentryUser.name`. | ||
* - note: Default: `true` | ||
*/ | ||
public var useSentryUser: Bool = true | ||
Check warning on line 18 in Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackFormConfiguration.swift
|
||
|
||
/** | ||
* Displays the Sentry logo inside of the form. | ||
* - note: Default: `true` | ||
|
@@ -41,16 +47,10 @@ public class SentryUserFeedbackFormConfiguration: NSObject { | |
|
||
/** | ||
* The label shown next to an input field that is required. | ||
* - note: Default: `"(required)"` | ||
* - note: Default: `"(Required)"` | ||
*/ | ||
public var isRequiredLabel: String = "(Required)" | ||
|
||
/** | ||
* The message displayed after a successful feedback submission. | ||
* - note: Default: `"Thank you for your report!"` | ||
*/ | ||
public var successMessageText: String = "Thank you for your report!" | ||
|
||
// MARK: Screenshots | ||
|
||
/** | ||
|
@@ -124,7 +124,7 @@ public class SentryUserFeedbackFormConfiguration: NSObject { | |
*/ | ||
public var emailPlaceholder: String = "[email protected]" | ||
|
||
public lazy var emailTextFieldAccessibilityLabel = emailPlaceholder | ||
public lazy var emailTextFieldAccessibilityLabel = "Your email address" | ||
Check warning on line 127 in Sources/Swift/Integrations/UserFeedback/Configuration/SentryUserFeedbackFormConfiguration.swift
|
||
|
||
// MARK: Buttons | ||
|
||
|