From 15a6f8e2657821a2af55eaa27fe1b258dfaf45a2 Mon Sep 17 00:00:00 2001 From: Mustapha-Tarek Ben Lechhab Date: Thu, 12 Dec 2024 11:36:50 +0100 Subject: [PATCH 1/2] Exclude the call that causes the crash from Mac (Designed for iPad) runtime --- Application/Sources/UI/Helpers/ModalTransition.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Application/Sources/UI/Helpers/ModalTransition.m b/Application/Sources/UI/Helpers/ModalTransition.m index 489cb3152..82f9ae05f 100755 --- a/Application/Sources/UI/Helpers/ModalTransition.m +++ b/Application/Sources/UI/Helpers/ModalTransition.m @@ -82,8 +82,11 @@ - (void)setupTransition:(id)transitionCont ]]; // Appearance events need to be notified manually for custom transitions, see https://stackoverflow.com/a/29041911/760435 - [fromViewController beginAppearanceTransition:NO animated:transitionContext.animated]; - [toViewController beginAppearanceTransition:YES animated:transitionContext.animated]; + + if ([[NSProcessInfo processInfo] isiOSAppOnMac] == false) { + [fromViewController beginAppearanceTransition:NO animated:transitionContext.animated]; + [toViewController beginAppearanceTransition:YES animated:transitionContext.animated]; + } [self updateTransition:transitionContext withProgress:0.f]; } From d66579af24d2e2e2a401d817fd3afb0956a3018c Mon Sep 17 00:00:00 2001 From: Mustapha-Tarek Ben Lechhab Date: Thu, 12 Dec 2024 11:42:39 +0100 Subject: [PATCH 2/2] Improve condition --- Application/Sources/UI/Helpers/ModalTransition.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Sources/UI/Helpers/ModalTransition.m b/Application/Sources/UI/Helpers/ModalTransition.m index 82f9ae05f..ecf7c03d2 100755 --- a/Application/Sources/UI/Helpers/ModalTransition.m +++ b/Application/Sources/UI/Helpers/ModalTransition.m @@ -83,7 +83,7 @@ - (void)setupTransition:(id)transitionCont // Appearance events need to be notified manually for custom transitions, see https://stackoverflow.com/a/29041911/760435 - if ([[NSProcessInfo processInfo] isiOSAppOnMac] == false) { + if (!NSProcessInfo.processInfo.isiOSAppOnMac) { [fromViewController beginAppearanceTransition:NO animated:transitionContext.animated]; [toViewController beginAppearanceTransition:YES animated:transitionContext.animated]; }