question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react native app restarted when changing permission through settings

See original GitHub issue

Is this a bug report?

Yes

Have you read the Bugs section of the How to Contribute guide?

Yes

Environment

  1. react-native -v: react-native-cli: 1.0.0, react-native: 0.35.0
  2. node -v: v6.6.0
  3. npm -v: 3.10.3
  4. yarn --version: --NA–

Then, specify:

  • Target Platform: Android(>=M) and Ios
  • Development Operating System: Ubuntu 14.04LTS, OS X 10.10: Yosemite
  • Build tools: Default

Steps to Reproduce

  1. Take a new/existing react native project. Please make sure it have some two pages[Page 1(initial), Page 2].
  2. Add any permissions(like Camera, Storage,…) to AndroidManifest.xml(For Android) & info.plist(For Ios) file.
  3. Run the app on emulator/simulator/a real device.
  4. At initial, Page 1 will be presented to the user.
  5. Navigate to Page 2.
  6. Minimize the app and go to settings and change the app permissions(Camera, Stroage…).
  7. Resume the app. It will open the Page1.

Expected Behavior

App needs to be in Page2.

Actual Behavior

App gets restarted and initial page will be displayed.

Reproducible Demo

https://github.com/pandiaraj44/ReactNativePermissionChangeBug

Video Ref: https://drive.google.com/file/d/0B9gIc_qkvdRIbm4xR3U2R292OHc

Actual Description

I have a react native app. Which is working fine in both ios & android but if change any permissions(Camera, Storage) through settings option then app get restarted.

For Example, If I am on the home-screen and I had changed the permission then the app will get restarted and takes me to the login screen.

Are there any options to maintain current app state(both ios and android)?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
victorbadilacommented, Jan 9, 2018

Someone please reopen this, it is still an issue and it is blocking for many of us. Also would be nice to add the iOS label as well, not sure how to do that though.

0reactions
stale[bot]commented, Jan 2, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native app made to restart when permission settings are ...
Upon changing any permissions (Camera, Storage) through the Settings option, the app should get restarted.
Read more >
react native app made to restart when permission settings are ...
Coding example for the question react native app made to restart when permission settings are changed.
Read more >
android – respond native app designed to restart when permission ...
I have a react native app that works fine on both Android and iOS. By changing any permissions (camera, storage) through the Settings...
Read more >
Permission refresh after changing … | Apple Developer Forums
Permission refresh after changing it in settings. I am running into an issue in my app where the user has denied access to...
Read more >
react-native-permissions - npm
A: This is normal. iOS restarts your app when your privacy settings change. Just google "iOS crash permission change". Keywords. react ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found