At #20, that is good to know.
For anyone else who has any interest in IOS development, I am going to post what I have found out.
It seems that the accessibilityTraits property allowsDirectInteraction is broken, and the documentation is inconsistent. I opened an issue for this on the React Native github repository.
So, in the end, I figured out through a lot of pane how to integrate a Swift View with Direct Touch enabled into my react native project. It is not all that much code in the end, although setting your project up to handle this is not fun. As mentioned before, you cannot bridge native code into react native such as Swift using Expo. So, you must either eject, or just create a new project using the react-native-cli, and copy over your source code. The second is what I did since ejecting looked like it was just going to be harder in the end.
When working with a react native project without Expo, you have to use the native tools, such as XCode to run and deploy onto a IPhone. Learning how to actually use XCode gave me a bit of trouble since it is not exactly intuitive on how to modify project properties, or how to open an editor for a code file. you have to get to the navigator pane, command 1 will do it, select the file you want to open, and then uninteract twice, scroll to the right to select editor, interact with editor, followed by the area that has speaks the name of the file you are opening, and then you can scroll to the right and interact with the scroll pane which is the editor itself. I am sure that there is an easier way to get to the editor, although I found the most frustrating part that I could not just do VO space or command o to open the file. The other thing that drove me nuts for a long time was the error that is given when you try to run your project in XCode something to the affect of "missing developer team". After a lot of Googling, I figured out that I had to modify the project properties, and the properties file had an extention of .xcodeproj. Problem is that when you go to the file navigator, there is no file with an extention of .xcodeprj. It was confusing especially since I am used to Eclipse where to modify project properties, you right clikc and go to the wnative windows property screen. In XCode, you have to select the name of your project, to be clear, you have to first expand your project name once and down arrow to the second iteration of your project name, then uninteract twice and go to the editor. The editor pane does not actually give you a tex editor to manipulate text, it gives you a UI for modifying properties. Selecting the signing tab, and then setting the developer team to your developer accounts signing certificate, you can fix the error. Note that you have to do this twice for both the main project and test targets. There is a button that mentions targets that you have to select which target you are changing properties for.
The short of it is that for every new project you create, you have to make sure that your main project and tests have a developer team assigned to them. These are called targets, and the developer team is the developer account you linked to XCode.
To explain everything I did would take a while, especially since most of my troubles came from installing the native packages for react navigation, which has a tun of dependencies. As long as you follow the react navigation getting started page carefully unlike me, you should be fine.
In terms of running the project, there are a couple things to do. The simulator is not very accessible. Well, to clarify, you can run the simulator, Voiceover will read controls for the virtual IPhone such as volume buttons or home button, but I could never figure out how to actually interact with the screen itself. Either way, the simulator lags pretty bad, and constantly is saying it is busy. so, you can relatively easily just run your app on your phone and even get a similar process as Expo as long as your phone is plugged into your Mac. The first thing you have to do is set the developer teams for your project and tests in XCode. Not sure if this can be done via the command line, probably, although it is not hard to do once you figured it out in XCode. Once that is done, you might be tempted to run your project using command r in XCode, just don't. It is very frustrating to deal with errors since react native has like 400 warnings that are generated, and the issue navigator just becomes unwieldy often causing Voiceover to freeze up. Instead, you will need to open 2 different terminal windows in your project directory.
in the first, run
npm start
to start the metro server, and
in the second, run
react-native run-ios --device "iPhone Timothy"
replace iPhone Timothy with your device name. after you run this command once, you may not need to include the device name.It will build and deploy to the phone. Note that your phone has to be plugged into your computer. When you try to open the app the first time you will get a warning about insecure certificates. To run your app, you have to trust your developer profile by going to settings/general/device management and trusting your profile. You should be able to run your app now, and if there are errors, some might show up on the phone, but most of the time examining both of the terminal windows for errors is more reliable. the window that is running your metro server will throw errors too, not just the window that you used to build the app. I found that some errors just did not show up in XCode,, even though the app may build but nothing would happen. Not sure if there is a way to get to those errors in XCode, but just running everything in the terminal is the easiest in my opinion. When making changes now in your code you should be able to shake your phone once done to open up the debug menu, note that your phone is still plugged in, click reload here, and it will just reload your app on to your phone for you pretty quickly. You can also use watchman, which is a tool for monitoring a folder structure for changes, so that on save, assuming that live reload is enabled in the debug menu on your phone, shake it to open this menu like mentioned, this should update on save of your code now.
Well that was a lot, and I simplified what I did quite a bit. I suppose I see why there is just not a single source of truth on how to get everything setup especially for a screen reader user.
I hope this helps someone.
Timothy Breitenfeldt