You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dismissing a modal in the new example using "expo-router" has a delayed status bar style update.
This has been reported in the past in "react-native-screens": software-mansion/react-native-screens#1305 and the advice has been to add the following to your app.json(ios key):
This currently causes the app to crash with the error: RCTStatusBarManager module requires that the UIViewControllerBasedStatusBarAppearance key in the Info.plist is set to NO.
This exact same error has been reported before in Expo and had been fixed: #20104.
But since the new "expo-router" this is re-introduced again as ExpoRoot.tsx forces the use of "expo-status-bar".
I'm currently using the following patch (disabling expo-status-bar) as a quick hack to resolve the crash and have a smooth status bar transition (upon closing the modal):
diff --git a/node_modules/expo-router/src/ExpoRoot.tsx b/node_modules/expo-router/src/ExpoRoot.tsx
index 263a3a1..e1eabab 100644
--- a/node_modules/expo-router/src/ExpoRoot.tsx
+++ b/node_modules/expo-router/src/ExpoRoot.tsx
@@ -1,4 +1,4 @@
-import { StatusBar } from "expo-status-bar";
+// import { StatusBar } from "expo-status-bar";
import React, { FunctionComponent, ReactNode, Fragment } from "react";
import { Platform } from "react-native";
import { SafeAreaProvider } from "react-native-safe-area-context";
@@ -64,7 +64,7 @@ export function ExpoRoot({
{children}
{/* Users can override this by adding another StatusBar element anywhere higher in the component tree. */}
- <StatusBar style="auto" />
+ {/* <StatusBar style="auto" /> */}
</SafeAreaProvider>
</GestureHandlerRootView>
</ParentWrapper>
dylancom
changed the title
[iOS] RCTStatusBarManager module requires that the UIViewControllerBasedStatusBarAppearance key in the Info.plist is set to NO
[iOS][expo-router] RCTStatusBarManager module requires that the UIViewControllerBasedStatusBarAppearance key in the Info.plist is set to NO
Jul 12, 2023
Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.
Minimal reproducible example
npx create-expo-app@latest --template tabs@49
Demo video (smooth status bar transition upon opening, delayed upon closing):
https://user-images.githubusercontent.com/47904203/152635313-b044f2fa-fcee-41c3-98b4-612d879e407d.mp4
Summary
Dismissing a modal in the new example using "expo-router" has a delayed status bar style update.
This has been reported in the past in "react-native-screens": software-mansion/react-native-screens#1305 and the advice has been to add the following to your app.json(ios key):
This currently causes the app to crash with the error:
RCTStatusBarManager module requires that the UIViewControllerBasedStatusBarAppearance key in the Info.plist is set to NO
.This exact same error has been reported before in Expo and had been fixed: #20104.
But since the new "expo-router" this is re-introduced again as
ExpoRoot.tsx
forces the use of "expo-status-bar".I'm currently using the following patch (disabling expo-status-bar) as a quick hack to resolve the crash and have a smooth status bar transition (upon closing the modal):
Environment
The text was updated successfully, but these errors were encountered: