Allow graceful symbol degration to support iOS 15+ at runtime#729
Conversation
…upport
Resolves UIAccessibilityPriorityHigh, UIAccessibilityPriorityLow, and
UIAccessibilitySpeechAttributeAnnouncementPriority via dlsym so the adapter no
longer aborts at launch on iOS 15/16. Announcements fall back to a plain,
unprioritized notification when the symbols are absent.
DataTriny
left a comment
There was a problem hiding this comment.
The market share of iOS <17 seem very small so I don't think I want to put much effort into that, but this is reasonable.
Looks good, just one comment.
DataTriny
left a comment
There was a problem hiding this comment.
Thank you! Supporting iOS 15+ seem reasonable for now and we will try to stick to it for a while. This is useful information that should be communicated somewhere. I would welcome a pull request adding this where you would have expected to find this information instead of discovering it at runtime. I will do it myself later otherwise.
|
Forgot to edit the commit message before merging so the crate version and changelog gets updated. Rewriting the commit on the main branch was unfortunately the better option. @molenick This is described in our contributing guide, please refer to it for your future contributions. |
First off - congrats on the release of accesskit_ios! 🎉
I started the process of using accesskit_ios to expose accessibility metadata in my egui app and was getting an immediate runtime crash on iOS 15.8.8. I looked into it and found that a few iOS 17+ symbols were being unconditionally loaded. This work gates the loading of those symbols on iOS 17+ so that iOS 15+ apps can make use of most of accesskit_ios's features.
Testing/Verification
In my private repo I was able to pin accesskit_ios to a local copy of this PR and verify that app was able to build, run and receive accesskit metadata on a real iPhone SE 1st gen running iOS 15.8.8