From 904cd3dbd79085185e0bcbe3cb1f4008bc3d5134 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Fri, 6 Sep 2024 07:53:01 +0200 Subject: [PATCH] Fix Catalyst build --- Packages/Env/Sources/Env/Ext/TranslationView.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Packages/Env/Sources/Env/Ext/TranslationView.swift b/Packages/Env/Sources/Env/Ext/TranslationView.swift index d107f99e..a1164621 100644 --- a/Packages/Env/Sources/Env/Ext/TranslationView.swift +++ b/Packages/Env/Sources/Env/Ext/TranslationView.swift @@ -5,11 +5,15 @@ import SwiftUI public extension View { func addTranslateView(isPresented: Binding, text: String) -> some View { + #if targetEnvironment(macCatalyst) + return self + #else if #available(iOS 17.4, *) { return self.translationPresentation(isPresented: isPresented, text: text) } else { return self } + #endif } } #endif