FormidableLabs / FormidableLabs/react-native-ama
useFocus does not seem to work in the iOS simulator (tested with VoiceOver)
- Dominant language
- TypeScript
- Stars
- 295
- Forks
- 22
- Avg merge
- 20m
- Merged PRs (30d)
- 2
Description
[Sample git repo](https://github.com/lgibso34/expo-test-app)
[Snack ](https://snack.expo.dev/@theprocessor/a62648)that doesn't work because it can't install `react-native-ama` but it is the example from the [docs](https://formidable.com/open-source/react-native-ama/hooks/useFocus#set-focus-programmatically).
I have tried to use `useFocus` on two different projects (and machines), and neither work with the IOS simulator. I built a further third project and was able to run it on my personal iPhone with voiceover and it seemed to work. It does seem to work on a physical device fine.
Is there anything that can be done about this for those of us who use the IOS simulator as their primary development device?
I even copy/pasted the `useFocus` code and tried it as a standalone hook since it doesn't rely on anything from the ``. Same thing.
Any help would be appreciated.
Thank you!
Additional question:
Why is `AccessibilityInfo.setAccessibilityFocus(elementId);` ran twice in [useFocus](https://github.com/FormidableLabs/react-native-ama/blob/main/lib/hooks/useFocus.ts#L20)?
Contributor guide
Assessment
This issue has not been assessed yet.