相关疑难解决方法(0)

Why is jQuery Ajax not working in Cordova iOS app

I am building a Cordova app that uses jQuery Ajax to upload images to our server. The uploads were working for a while on both Android and iOS, then after a while they suddenly stopped working on iOS. Now, after a few seconds of trying to access a website, the request fails and I get an error message, which isn't much help. The error is like the following:

readyState: 0
status: 0
statusText: "error"
Run Code Online (Sandbox Code Playgroud)

My code is:

    $.ajax("http://testapi.com/api", {
        data: …
Run Code Online (Sandbox Code Playgroud)

ajax jquery ios cordova

4
推荐指数
1
解决办法
5110
查看次数

Angularjs http.jsonp iOS9 404

我有一个Cordova Angularjs应用程序从我的服务器获取一些JSON.它适用于iOS 8,但当我"升级"到iOS 9时,我现在从我的服务器中得不到任何东西.服务器尚未更改,如果我导航到我的URL,我可以看到JSON响应.

我把它缩小到我的$ http.jsonp()方法.尝试检索JSON时,它给出了404错误.相同的确切代码工作正常,并在iOS 8设备上获取JSON.

其他任何人都有这个和iOS 9的问题,并已经想出更多?这看起来像苹果相关的问题......

jsonp http ios angularjs cordova

0
推荐指数
1
解决办法
915
查看次数

标签 统计

cordova ×2

ios ×2

ajax ×1

angularjs ×1

http ×1

jquery ×1

jsonp ×1