开发者

Javascript Alert pop up not working in IOS for phonegap

开发者 https://www.devze.com 2023-04-09 23:54 出处:网络
I have phonegap app build for android and IOS. The alert-box is working great in Android but I am not getting alert in Iphone. Please help.

I have phonegap app build for android and IOS. The alert-box is working great in Android but I am not getting alert in Iphone. Please help.

This piece of code works good for droid:

else {
  navigator.notification.alert('Invalid Username or开发者_开发技巧 Password!');
}


I had a problem like that, phonegap wasn't working with iOS and working with Android.

In my case, that happened because the phonegap.js is different from Android's to iOS, so I had to move my www folder to iOS app and keep the iOS phonegap.js instead of using Android phonegap.js

I did that by creating a "HelloWorld" iOS + Phonegap app and copying his phonegap.js to my actual app.

After that, Phonegap started to work again! See ya!

0

精彩评论

暂无评论...
验证码 换一张
取 消