Skip to content

Commit 5315db1

Browse files
committed
fix build
1 parent 8a4f0d1 commit 5315db1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,18 @@ class ExtraViewController: UIViewController {
350350
}
351351

352352
@IBAction func showFeedbackWidget(_ sender: Any) {
353-
SentrySDK.showFeedbackWidget()
353+
if #available(iOS 13.0, *) {
354+
SentrySDK.showFeedbackWidget()
355+
} else {
356+
showToast(in: self, type: .warning, message: "Feedback widget only available in iOS 13 or later.")
357+
}
354358
}
355359

356360
@IBAction func hideFeedbackWidget(_ sender: Any) {
357-
SentrySDK.hideFeedbackWidget()
361+
if #available(iOS 13.0, *) {
362+
SentrySDK.hideFeedbackWidget()
363+
} else {
364+
showToast(in: self, type: .warning, message: "Feedback widget only available in iOS 13 or later.")
365+
}
358366
}
359367
}

0 commit comments

Comments
 (0)