diff --git a/src/Sentry.Unity.Android/SentryNativeAndroid.cs b/src/Sentry.Unity.Android/SentryNativeAndroid.cs index 1c6b2e705..1d2122939 100644 --- a/src/Sentry.Unity.Android/SentryNativeAndroid.cs +++ b/src/Sentry.Unity.Android/SentryNativeAndroid.cs @@ -70,7 +70,7 @@ public static void Configure(SentryUnityOptions options, ISentryUnityInfo sentry options.EnableScopeSync = true; options.CrashedLastRun = () => { - options.DiagnosticLogger?.LogDebug("Checking for `CrashedLastRun`"); + options.DiagnosticLogger?.LogDebug("Checking for 'CrashedLastRun'"); var crashedLastRun = SentryJava.CrashedLastRun(JniExecutor); if (crashedLastRun is null) @@ -83,8 +83,7 @@ public static void Configure(SentryUnityOptions options, ISentryUnityInfo sentry } else { - options.DiagnosticLogger? - .LogDebug("Native Android SDK reported: 'crashedLastRun': '{0}'", crashedLastRun); + options.DiagnosticLogger?.LogDebug("Native SDK reported: 'crashedLastRun': '{0}'", crashedLastRun); } return crashedLastRun.Value; diff --git a/src/Sentry.Unity.iOS/SentryNativeCocoa.cs b/src/Sentry.Unity.iOS/SentryNativeCocoa.cs index 3a6e83601..9d2097d3e 100644 --- a/src/Sentry.Unity.iOS/SentryNativeCocoa.cs +++ b/src/Sentry.Unity.iOS/SentryNativeCocoa.cs @@ -56,9 +56,10 @@ internal static void Configure(SentryUnityOptions options, ISentryUnityInfo sent options.EnableScopeSync = true; options.CrashedLastRun = () => { + options.DiagnosticLogger?.LogDebug("Checking for 'CrashedLastRun'"); + var crashedLastRun = SentryCocoaBridgeProxy.CrashedLastRun() == 1; - options.DiagnosticLogger? - .LogDebug("Native SDK reported: 'crashedLastRun': '{0}'", crashedLastRun); + options.DiagnosticLogger?.LogDebug("Native SDK reported: 'crashedLastRun': '{0}'", crashedLastRun); return crashedLastRun; };