iOS 8 Beta and Cordova <= 3.5.0
If you’ve had a play around with iOS 8 beta (like me), you’ll probably have noticed there’s an issue.
WebKit iOS 8
If you take a look at the WebKit iOS 8 release notes you’ll see it makes specific mention of Cordova / PhoneGap:
Essentially, what happens is Cordova / PhoneGap replaces the
window.navigator, as you can see here.
Although this will be fixed in Cordova 3.6.0 when support for the new Cordova bridge under iOS 8 WKWebView is implemented, Eddy Verbruggen has come up with a neat little fix to check if the
navigator.userAgent is undefined and assign a return value to it:
Also, targeting 7.0 (which I doubt you’re doing if you’re playing with iOS 8 beta) should also still work.