software-mansion / react-native-screens

Native navigation primitives for your React Native app.
https://docs.swmansion.com/react-native-screens/
MIT License
3.01k stars 512 forks source link

Error with UIViewControllerBasedStatusBarAppearance #1625

Closed iamvucms closed 1 year ago

iamvucms commented 1 year ago

Description

image

Steps to reproduce

Generate new project 0.69.3 and install latest react-native-screens.

Snack or a link to a repository

None

Screens version

3.18.2

React Native version

0.69.3

Platforms

iOS

JavaScript runtime

No response

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

github-actions[bot] commented 1 year ago

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

kkafar commented 1 year ago

Hi @iamvucms,

to resolve this issue you should first try out instructions from error message.

You should add

<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>

to your application Info.plist file.

You can see it done here

You can also edit Info.plist via Xcode (just google it).

Let me know if it worked!

kkafar commented 1 year ago

I'll actually close this issue. Notify me (by tagging) in case the issue was not resolved by my suggestion.

vanhai989 commented 7 months ago

I'll actually close this issue. Notify me (by tagging) in case the issue was not resolved by my suggestion.

the UIViewControllerBasedStatusBarAppearance require value set to NO

It still error in react native 0.70.13 when I use import { createNativeStackNavigator } from 'react-native-screens/native-stack'; when I use createNativeStackNavigator of @react-navigation/native-stack the error will be gone import { createNativeStackNavigator } from '@react-navigation/native-stack';

vanhai989 commented 6 months ago

it doesn't occur in react-native-screens v2.18.1, when I update to rn-screens v3.29.0 the error will appeared