From eafa0778ef0fe7f7297b1c7d5a997d438587ea1c Mon Sep 17 00:00:00 2001 From: Jesse Youngblood Date: Sun, 29 Oct 2023 11:49:20 -0400 Subject: [PATCH 1/2] fix: Display subtitle on actions in iOS 15+ As of iOS 15, `discoverabilityTitle` is no longer displayed as the subtitle UIActions. Subtitles are not visible to iOS users of this package. This update brings them back! --- ios/RCTMenuItem.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ios/RCTMenuItem.swift b/ios/RCTMenuItem.swift index ec6f4579..dc752b93 100644 --- a/ios/RCTMenuItem.swift +++ b/ios/RCTMenuItem.swift @@ -95,6 +95,11 @@ class RCTMenuAction { return UIMenu(title: title, image: image, children: subMenuActions) } } - return UIAction(title: title, image: image, identifier: identifier, discoverabilityTitle: subtitle, attributes: attributes, state: state, handler: handler) + + if #available(iOS 15, *) { + return UIAction(title: title, subtitle: subtitle, image: image, identifier: identifier, attributes: attributes, state: state, handler: handler) + } else { + return UIAction(title: title, image: image, identifier: identifier, discoverabilityTitle: subtitle, attributes: attributes, state: state, handler: handler) + } } } From d578dafaa7fa989c4f960a55d43d9df1549980c1 Mon Sep 17 00:00:00 2001 From: Jesse Youngblood Date: Sun, 29 Oct 2023 12:21:04 -0400 Subject: [PATCH 2/2] chore: Update example lockfile --- example/ios/Podfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index acae3f7f..dddca6fe 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -343,7 +343,7 @@ PODS: - React-jsinspector (0.72.4) - React-logger (0.72.4): - glog - - react-native-menu (0.8.0): + - react-native-menu (0.9.1): - React - React-NativeModulesApple (0.72.4): - React-callinvoker @@ -666,7 +666,7 @@ SPEC CHECKSUMS: React-jsiexecutor: bc8a9ad812a2c88b3a41c08b5f4b3ed32d6d4766 React-jsinspector: aaed4cf551c4a1c98092436518c2d267b13a673f React-logger: da1ebe05ae06eb6db4b162202faeafac4b435e77 - react-native-menu: 5b9b82dabcc779cebde15d292ccbcba4469ff311 + react-native-menu: 9728f90160c36b9a75481fc76e05354b99d54c59 React-NativeModulesApple: 759309419da76ef4c9f331968b840022ee2aa5b1 React-perflogger: 496a1a3dc6737f964107cb3ddae7f9e265ddda58 React-RCTActionSheet: 02904b932b50e680f4e26e7a686b33ebf7ef3c00