From 5707d1a57f59953f7372d0eabd0cacf0e5718d0c Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Thu, 17 Jul 2025 15:08:32 -0800 Subject: [PATCH] test: restart the SDK when changing the DSN --- .../SentrySampleShared/DSNDisplayViewController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Samples/SentrySampleShared/SentrySampleShared/DSNDisplayViewController.swift b/Samples/SentrySampleShared/SentrySampleShared/DSNDisplayViewController.swift index bc954c5db02..e0aeda57736 100644 --- a/Samples/SentrySampleShared/SentrySampleShared/DSNDisplayViewController.swift +++ b/Samples/SentrySampleShared/SentrySampleShared/DSNDisplayViewController.swift @@ -77,6 +77,8 @@ class DSNDisplayViewController: UIViewController { DispatchQueue.main.async { self.updateDSNLabel() } + + SentrySDKWrapper.shared.startSentry() } } else { showToast(in: self, type: .warning, message: "Invalid DSN, reverting to the default.") @@ -92,6 +94,8 @@ class DSNDisplayViewController: UIViewController { DispatchQueue.main.async { self.updateDSNLabel() } + + SentrySDKWrapper.shared.startSentry() } } } @@ -119,6 +123,8 @@ class DSNDisplayViewController: UIViewController { DispatchQueue.main.async { showToast(in: self, type: .success, message: "DSN reset to default!") } + + SentrySDKWrapper.shared.startSentry() } catch { SentrySDK.capture(error: error) DispatchQueue.main.async {