Closed Saadnajmi closed 1 month ago
EDIT: And ported. Good to go!
This PR works as far as I can tell, save custom menus. The method for showing custom actions in a context menu on iOS 16 / visionOS 1.0 changed (use UIEditMenuConfiguration
instead of UIMenuController
), so I'm seeing If I can refactor that bit. Otherwise, this change might be able to land without custom menu support
Hello @Titozzz / @jamonholmgren , I was wondering if there was anything I could do to help move this PR forward? Appreciate your time spent maintaining this repo :)
:tada: This PR is included in version 13.9.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Summary
Add visionOS support, and an example test app via react-native-test-app.
As it turns out, most of where we ifdeffed stuff out for macOS, is also where we need to ifdef out for visionOS. So a simple conversion of the ifdefs from "if !macOS" to "if iOS" does the job.
Additionally, we needed to port uses of
UIMenuController
to toUIEditMenuInteraction
. This is only available on iOS 16+, so I did my best to guard behind availability checks and compiler ifdefs. I am not sure what our minimum iOS/Xcode version we want to support in this repo is, so I would appreciate a sanity check.Test Plan
Test app works. Custom menus work on both iOS 16 and visionOS 1.0
(Sorry for the compressed video)
https://github.com/react-native-webview/react-native-webview/assets/6722175/fbab0541-c47c-4ae9-bbc3-84057605101e