How to quit the app in Ionic 4

Which is the exitApp subistitute for Ionic 4 since platform.exitApp() is no longer available?

Iā€™m also looking forward for this question, as I settled on using a native plugin called

https://www.npmjs.com/package/cordova-plugin-exit

Hi abussar, thanks for your answer. I donā€™t know why but this plugin did not work for me. The compiler did not find the method ā€œcordova.plugins.exit()ā€ so Iā€™d use this ā€œnavigator[ā€˜appā€™].exitApp()ā€ and worked for me.

Thank you anyway.

1 Like

work for me.
thanks.

in my page showing error ā€œcannot fine app nameā€ what to do

can you show the code here

Hii #flaviotobias in which page have to use this line ā€œnavigator[ā€˜appā€™].exitApp()ā€ for quit app .
Is it use in component page or dashboard page?

hi, I tried to input that code, but it says navigator is undefined.