【发布时间】:2018-06-27 13:42:46
【问题描述】:
我正在使用 Kinvey 的后端服务,通过他们的 Javascript API 访问。 Kinvey 的初始化在任何 PC 浏览器(Safari、FF、Chrome)以及 FF 手机和 Chrome 手机上都可以正常工作。我只在 iPhone 的 Safari 和 iPad 的 Safari 上收到此错误,控制台输出:
jQuery.Deferred 异常:找不到变量:Kinvey https://.html:22:15 l@https://code.jquery.com/jquery-3.3.1.min.js:2:29380 https://code.jquery.com/jquery-3.3.1.min.js:2:29678
这是显示错误的代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>My App</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://da189i1jfloii.cloudfront.net/js/kinvey-html5-sdk-3.11.1.min.js"></script>
<script src="https://matthewcv.github.io/mobiledebug.js"></script>
</head>
<script>
$(document).ready(function() {
console.log("before");
// Init Kinvey
Kinvey.init({
appKey: '<yourAppKey>',
appSecret: '<yourAppSecret>'
});
console.log("after");
});
</script>
<body>
<div>
Show something
</div>
</body>
</html>
我正在使用最新的 iOS 以及最新的 Javascript 包。
我在 Kinvey 的论坛上写了几次,但似乎没有人关心。所以我在这里尝试一下,希望有人知道解决方案。
【问题讨论】:
-
我无法重现此问题。我运行这个请求没有错误。 jsfiddle.net/remotesynth/pr69c47k/1
-
哇,谢谢,这对我有帮助!这告诉我,我必须重置我的 iPhone,然后它才能工作!清空缓存没有帮助。那就搞砸了。
标签: javascript jquery ios iphone kinvey