VoiceOver has a very cool gesture called the Magic Tap (double tap with two fingers). It should execute the most important task for the current state of the app. Examples: start/stop timer, play/pause music, take a photo, compose a tweet...

The twitter app is open. It doesn't matter where the focus is, if I double tap with two fingers, the compose tweet screen will be presented. Presumably Twitter is overriding the function accessibilityPerformMagicTap and executing the code that presents that screen and then returning true.

You just need to override accessibilityPerformMagicTap() to capture that gesture, execute the desired code, and return true if handled successfully.

https://developer.apple.com/documentation/objectivec/nsobject-swift.class/accessibilityperformmagictap()

You may also find interesting...

This is my favorite way of testing VoiceOver. Pick a flow in your app. Turn VoiceOver on. Triple tap with three fingers on the screen to enable Screen Curtain. The screen goes off but you can still navigate your device with VoiceOver.

UINotificationFeedbackGenerator has a “success” feedback type. Consider using it when a task was performed successfully together with any other visuals or sound. The use of multiple modes just makes it easier for everyone to understand your app.

All the accessibility capabilities you can check for, have counterpart notification names you can observe in case the user changes its preferences while using your app. https://x.com/dadederk/status/1577435144129892352

Created in Swift with Ignite.

Supporting Swift for Swifts