[RN][iOS] Fix warning when loading RCTUIManager and A11yManager #42734
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
When we fixed the race condition between A11yManager and RCTUIManager, we did it by moving the A11yManager on a background queue.
In the old architecture, this was raising a warning which our users might find confusing. Plus, that change was not aligned with what the A11yManager declared in its configuration because we are actually initializing it starting from a BG queue.
With this change we anticipate the initialization of the module in a place where:
This should allow us to also remove the feature flag of RCTUIManagerDispatchAccessibilityManagerInitOntoMain because now it is safe to use the main_queue as requested by the module.
Changelog:
[iOS][Fixed] - Initialize the A11yManager in the main queue and when we need it.
Test Plan:
Tested in an app running 0.73.3, using the following configurations: