IPhone does not recognize PhoneGap navigator.app

I have a button to exit the application. The function is as follows:

//Close application function close_window() { navigator.app.exitApp(); } 

This did not work, so I tried the following line:

 navigator.device.exitApp(); 

That didn't work either. Then I found out that the iPhone does not recognize PhoneGap navigator.app and navigator.device. I am using PhoneGap version 2.2.0.

Why is this happening?

PS: This works for me on Android.

+8
javascript html5 iphone cordova
source share
1 answer

navigator.app.exitApp () does not work on iOS, only Android. In iOS, Apple does not allow software programs to log out.

This can be done using iOS target c, but there is a good chance that this application will be rejected in the Apple app store.

You will find a good explanation here: https://groups.google.com/forum/?fromgroups=#!topic/phonegap/XjTm0ua4uOY .

+19
source share

All Articles