Phonegap / Cordova在ios8中不工作 [英] Phonegap / Cordova not working in ios8

查看:125
本文介绍了Phonegap / Cordova在ios8中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用iOS 8测试版,注意到Cordova / Phonegap是非常破碎。

I played around with the iOS 8 beta and noticed that Cordova/Phonegap is pretty much broken.

对我来说,主要是InAppBrowser,现在不显示

For me it is mainly the InAppBrowser that now doesn't show up.

您的经验是什么?
你有解决方案的修复或想法吗?

what are your experiences? Do you have a fix or an idea for a solution?

谢谢。

推荐答案

您可以在index.html(或安装iOS 8 beta 2,似乎已经解决了这个问题)的一些Javascript修复这个问题:
https://gist.github.com/EddyVerbruggen/cd02c73162180793513e#file-ios8-beta-phonegap-fix

You can fix this with a bit of Javascript in your index.html (or install iOS 8 beta 2, which seems to have fixed the issue): https://gist.github.com/EddyVerbruggen/cd02c73162180793513e#file-ios8-beta-phonegap-fix

// temp fix for iOS8 beta, add it after the reference to cordova.js
// You don't actually require it for ios 8 beta 5
if (navigator.userAgent === undefined) {
  navigator.__defineGetter__('userAgent', function() {
    return("Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit");
  });
}

这篇关于Phonegap / Cordova在ios8中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆