Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native color scheme not changing when system theme changes #452

Open
christianjuth opened this issue Jan 25, 2025 · 2 comments
Open

Comments

@christianjuth
Copy link
Contributor

christianjuth commented Jan 25, 2025

I made sure to set expo.userInterfaceStyle = "automatic"

Note: I'm doing my testing on iOS 18.1 simulator, and both debug and release schemes seem to be broken.

  1. Clone the reproduction repo
  2. npm i --force
  3. npm run prebuild:native
  4. Set scheme to release, build, and install on iOS 18.1 simulator
  5. Launch the app. The color scheme should correctly read the system theme
  6. Put the app in the background, but don't close it
  7. Toggle the system theme
  8. Put the app back in the foreground and see if it changed with the system
  9. Repeat steps 6-8 a second time, as the theme seems to sometimes change one but not a second time

Note: I imagine 18.1 isn't the issue, but just wanted to mention that incase it's a factor.

Since @vxrn/color-scheme uses React Native useColorScheme under the hood, it also doesn't seem to work.

@natew
Copy link
Collaborator

natew commented Jan 31, 2025

Is React Native useColorScheme broken?

@christianjuth
Copy link
Contributor Author

@natew that's what it seems? It's working in Expo but not One. No idea how that's even possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants