[native] [28/40] RN 0.70: Fix Expo 47 SecureStore crash on Android
Summary:
I (@ashoat) was seeing a crash-on-start in the Android app after the Expo update: ENG-2211. In the Linear issue, you can see that @bartek took on the investigation and created this commit that resolved the issue. Here's the initial commit text from him:
The expo-secure-store on Android now requires also providing Expo-specific ModuleRegistry. This is only needed, because the module now requires two interfaces: UIManager and ActivityProvider and it tries to access them using the module registry. Both of them are implemented by UIManagerModuleWrapper class which is simply a wrapper for some RN/Android functionalities.
My workaround is as follows:
- Create mock expo ModuleRegistry object
- Add a single module to the registry: UIManagerModuleWrapper
- Provide the registry to SecureStoreModule.onCreate() to make it happy
Depends on D5922
Test Plan:
- Confirm crash-on-start with error text from linked Linear task is gone
- Tested along with whole stack: test plan
Reviewers: tomek, bartek
Subscribers: atul, bartek
Differential Revision: https://phab.comm.dev/D5923