When I open a URL (for example, this http://webserver/index.php/feeds/1.2/3.4/5/1000/ ) in my application through Xcode, I get a JSON string of zero. He does not even talk to the server.
Exactly the same URL works when I embed it in a browser.
Reading similar problems, I tried restarting my Mac and iPhone, but I have the same problem.
eg. looking at the error object, I see:
Error Domain=NSCocoaErrorDomain Code=256 "The file "1000" couldn't be opened." UserInfo={NSURL=http:
The web server does not show log entries (it does if I insert the URL in the browser) when I launch the application and pass this line of code.
==== UPDATE
I assume this is due to this Error loading NSURLSession / NSURLConnection HTTP on iOS 9
However, after adding the webservice domain to plist (in NSExceptionDomains), I get a failure in the CJSONDserializer in this method:
- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError; { if (inData == NULL || [inData length] == 0)
in the following way:
Thread 4: EXC_BAD_ACCESS (code=1,address=0x10)
and after updating TouchJSON I now have a crash:
if (theData.length >= 4)
==== UPDATE 2
Interestingly, if I clicking the QuickLook icon in Xcode while at a breakpoint, it will load the content just fine. And I see a request on the server.
Any suggestions?
source share