简体   繁体   中英

How do I kill react-native app using Expo Cli pragmatically for iOS?

I want to kill the application pragmatically. I am using expo cli in my application. I found one solution https://github.com/wumke/react-native-exit-app , but it doesn't seems compatible with expo cli. I don't want to eject expo. Is there another way I can pragmatically kill iOS app without ejecting expo?

If you don't use the module, you can't solve the problem at this time in Expo .

Similar to the module, there is a module called BackHandler , but iOS does not.

  • Android : Detect hardware back button presses, and programmatically invoke the default back button functionality to exit the app if there are no listeners or if none of the listeners return true.
  • tvOS : Detect presses of the menu button on the TV remote. (Still to be implemented: programmatically disable menu button handling functionality to exit the app if there are no listeners or if none of the listeners return true.)
  • iOS : Not applicable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM