From 36d8449ceadf55190f48d1fd515f094779c21303 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Thu, 5 Jan 2023 20:20:48 +0100 Subject: [PATCH] Fix app launching on macOS (but no QuickLook for now) --- IceCubesApp/App/IceCubesApp.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/IceCubesApp/App/IceCubesApp.swift b/IceCubesApp/App/IceCubesApp.swift index df6c5490..492b3501 100644 --- a/IceCubesApp/App/IceCubesApp.swift +++ b/IceCubesApp/App/IceCubesApp.swift @@ -41,7 +41,6 @@ struct IceCubesApp: App { .environmentObject(currentInstance) .environmentObject(theme) .environmentObject(watcher) - .quickLookPreview($quickLook.url, in: quickLook.urls) } .onChange(of: scenePhase, perform: { scenePhase in handleScenePhase(scenePhase: scenePhase) @@ -60,9 +59,15 @@ struct IceCubesApp: App { @ViewBuilder private var appView: some View { if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac { - splitView + if ProcessInfo.processInfo.isiOSAppOnMac { + splitView + } else { + splitView + .quickLookPreview($quickLook.url, in: quickLook.urls) + } } else { tabBarView + .quickLookPreview($quickLook.url, in: quickLook.urls) } }