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.
javascript html5 iphone cordova
Hodaya shalom
source share