How to exit an app programatically in ionic 2

I want to exit an app programmatically if authentication fails.

Just use
this.platform.exitApp();

Tried on IOS but no luck…

Ios will not allow to exit app programatically . if you try to do that then app store will reject your app.this.platform.exitApp(); this will work with android

1 Like

Yes we can do that…

There is also an exit function in iOS