From 4a98f904a2593c16ac1f13ecc5a68af78309232b Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 22 Sep 2022 11:56:59 +0200 Subject: [PATCH 1/3] Update UIMenu+Init.swift --- ios/src/Extensions+Init/UIMenu+Init.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/src/Extensions+Init/UIMenu+Init.swift b/ios/src/Extensions+Init/UIMenu+Init.swift index a2c8e7e2..7783d33a 100644 --- a/ios/src/Extensions+Init/UIMenu+Init.swift +++ b/ios/src/Extensions+Init/UIMenu+Init.swift @@ -19,6 +19,7 @@ extension UIMenu.Options { }; }; +#if !targetEnvironment(macCatalyst) #if swift(>=5.7) @available(iOS 16, *) extension UIMenu.ElementSize { @@ -33,4 +34,4 @@ extension UIMenu.ElementSize { }; }; #endif - +#endif From 9f28a8b01c3fb6374413c2ed080cb76c181586a2 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 22 Sep 2022 11:57:30 +0200 Subject: [PATCH 2/3] Update UIMenuElement+Init.swift --- ios/src/Extensions+Init/UIMenuElement+Init.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/src/Extensions+Init/UIMenuElement+Init.swift b/ios/src/Extensions+Init/UIMenuElement+Init.swift index 44d44337..2b375dcb 100644 --- a/ios/src/Extensions+Init/UIMenuElement+Init.swift +++ b/ios/src/Extensions+Init/UIMenuElement+Init.swift @@ -15,11 +15,13 @@ extension UIMenuElement.Attributes { case "disabled" : self = .disabled; case "destructive": self = .destructive; + #if !targetEnvironment(macCatalyst) #if swift(>=5.7) case "keepsMenuPresented": guard #available(iOS 16.0, *) else { return nil }; self = .keepsMenuPresented #endif + #endif default: return nil; }; From 402db865f37aa73db4f77e7f70f8cfc380489062 Mon Sep 17 00:00:00 2001 From: Samuel <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 22 Sep 2022 11:59:06 +0200 Subject: [PATCH 3/3] Update RNIMenuItem.swift --- ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift b/ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift index 71ab1980..b7890042 100644 --- a/ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift +++ b/ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift @@ -119,6 +119,7 @@ extension RNIMenuItem { ); }; + #if !targetEnvironment(macCatalyst) #if swift(>=5.7) @available(iOS 16.0, *) var synthesizedPreferredMenuElementSize: UIMenu.ElementSize? { @@ -128,6 +129,7 @@ extension RNIMenuItem { return UIMenu.ElementSize(string: menuPreferredElementSize); }; #endif + #endif }; // MARK: - Functions @@ -163,6 +165,7 @@ extension RNIMenuItem { }; #endif + #if !targetEnvironment(macCatalyst) #if swift(>=5.7) if #available(iOS 16.0, *), let preferredElementSize = self.synthesizedPreferredMenuElementSize { @@ -170,6 +173,7 @@ extension RNIMenuItem { menu.preferredElementSize = preferredElementSize; }; #endif + #endif return menu; };