From 5946aaeffbe1be6db87d225d918cbb6d0c17e91a Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Wed, 6 Aug 2025 11:08:33 -0300 Subject: [PATCH] Update comment regarding notification --- Example/DemoApp/UpdateUtil.swift | 3 ++- Sources/ETDistribution.swift | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Example/DemoApp/UpdateUtil.swift b/Example/DemoApp/UpdateUtil.swift index eb3d137..6c194e0 100644 --- a/Example/DemoApp/UpdateUtil.swift +++ b/Example/DemoApp/UpdateUtil.swift @@ -83,7 +83,8 @@ struct UpdateUtil { } DispatchQueue.main.async { UIApplication.shared.open(url) { _ in - // Post notification event before closing the app + // Post notification event before closing the app, some SDKs may consider exit(0) as an unexpected + // termination otherwise. This is the case for Sentry. NotificationCenter.default.post(name: UIApplication.willTerminateNotification, object: nil) // Close the app after a slight delay so it has time to execute code for the notification diff --git a/Sources/ETDistribution.swift b/Sources/ETDistribution.swift index 26fc6ce..ac60d35 100644 --- a/Sources/ETDistribution.swift +++ b/Sources/ETDistribution.swift @@ -276,7 +276,8 @@ public final class ETDistribution: NSObject { return } UIApplication.shared.open(url) { _ in - // Post notification event before closing the app + // Post notification event before closing the app, some SDKs may consider exit(0) as an unexpected + // termination otherwise. This is the case for Sentry. NotificationCenter.default.post(name: UIApplication.willTerminateNotification, object: nil) // Close the app after a slight delay so it has time to execute code for the notification