mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: The `StatusBarManager` NativeModule does not have a uniform API on iOS and Android. In particular, the `setStyle` and the `setHidden` methods have an additional parameter on iOS: ``` /** * - statusBarStyles can be: * - 'default' * - 'dark-content' * - 'light-content' */ +setStyle: (statusBarStyle?: ?string, animated: boolean) => void; /** * - withAnimation can be: 'none' | 'fade' | 'slide' */ +setHidden: (hidden: boolean, withAnimation: string) => void; ``` If we keep the NativeModule spec the same between the two platforms, we'd have to keep the second parameter optional for both methods. This works for `setHidden`, because the second parameter is a string, and optional strings are allowed. However, for `setStyle`, the second parameter is a number, and we don't support optional numbers/booleans on Android in the NativeModule system. If we keep the optional number, then the following check triggers in our RedBox tests on iOS, which makes them fail: https://fburl.com/diffusion/b7adezd9. So, since the two specs are sufficiently different, I figured that the easiest path forward is to split them apart. Changelog: [iOS][Changed] - Separated NativeStatusBarManager into NativeStatusBarManager{IOS,Android} Reviewed By: PeteTheHeat Differential Revision: D18214161 fbshipit-source-id: 6fd8b8c5f576244b5b90ee47faa7f50508c5e1d3
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.