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