iOS Phonegap application using XMLHTTPRequest to post to secured webservice call returns status as 0
I am developing an iOS app using phone gap and am stuck at a point. When I try to access a webservice using XMLHTTPR开发者_C百科equest() I get an status as 0. When I watch this request in fiddler I see that there is proper response.
I have already looked at links stating the PhoneGap app are not restricted by same-origin policy. But I still fail to resolve this issue.
The only difference I could see was that the url I am accessing is secured https. Is there anything like requests to https are not allowed crossdomain.
Please help. I am stuck here for a whole day today.
Could it be that the certificate of the https webservice you are pointing to is self-signed?
If so, there is no way use anything but a secure known certificate with PhoneGap ajax calls.
See: https request doesn't work in phonegap-iphone app
Another option could be related to your version of XCode: run https request in phone gap
精彩评论