Skip to content

Instantly share code, notes, and snippets.

@enterstudio
Forked from EddyVerbruggen/iOS8 Beta Phonegap fix
Created December 8, 2018 05:28
Show Gist options
  • Save enterstudio/9e77c6813041524d61666e26a919bf6c to your computer and use it in GitHub Desktop.
Save enterstudio/9e77c6813041524d61666e26a919bf6c to your computer and use it in GitHub Desktop.
iOS8 Beta Phonegap fix: manually set the navigator.userAgent
// temp fix for iOS8 beta 1 (fixed in beta 2), add it after the reference to cordova.js
if (navigator.userAgent === undefined) {
navigator.__defineGetter__('userAgent', function() {
return("Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment