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

Changing the language or appearance crashes the app in release build #18

Closed
talha-irshad-kodexo opened this issue Mar 22, 2022 · 2 comments

Comments

@talha-irshad-kodexo
Copy link

Hi, I was using your code as a boilerplate for my app and faced this issue in which changing the language or appearance crashes the app in release build. The app works fine while development in expo or expo go but after creating a release build, it crashes the app and the mobx store gets emptied too. It seems like reloadAsync used is not functioning properly. I was wondering if you have faced this issue and if you did, how did you resolved it or is there any alternative to reloadAsync that you used because I tried everything but got no luck. Thanks

@kanzitelli
Copy link
Owner

Hey @talha-irshad-kodexo! That's weird because reloadAsync is a function from expo-updates. Have you tried looking in expo-updates issues?

You can also try using react-native-restart but it requires adding native part. For example, you can check rn-starter, here and here.

Let me know how it goes!

@talha-irshad-kodexo
Copy link
Author

Hi, It turned out to be my fault, I added another language and changed the languageFromInternalToUI function and added another ternary operator for checking the third language and that messed up the project. I then converted the ternary to if else and it works well now.

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