RestKit: RKClient not recognized by Xcode project - ios

I am using/implementing RestKit into my project at the moment, and I've followed the github wiki to install everything correctly. Everything is there and working properly. The application builds and runs great. I'm just trying to make a HTTP GET request now by first setting up the RKClient, but my project doesn't seem to recognize RKClient even though I've imported the <RestKit/Restkit.h> file in the header of the file.
I'm beginning to think that the RKClient class is deprecated or something because every other class seems to be there as expected.
I've tried looking everywhere and really ensuring that I've followed the instructions to setup RestKit properly, and yet I'm still stuck on the first line!! (Initializing the RKClient).
Another possibility is that I'm doing this all wrong. I just implemented the library, so I'm just playing around with it. But if I'm not doing a HTTP GET request the right way, please guide me the right direction.
Thanks!!

From RestKit 0.20.x onwards RKClient is not part of RestKit. You can use HTTP Client like :
[RKObjectManager myObjManager].HTTPClient
See This Link

Related

React-Native-Vision-Camera Exception when reading a QR-Code

I'm using react-native-vision-camera to build a QR-Code-Scanner for my app. I followed this guide by dynamsoft: https://www.dynamsoft.com/codepool/react-native-qr-code-scanner-vision-camera.html
In the beginning everything worked fine but now I'm always getting an Exception when reading QR-Codes with my camera. Even with the provided example project in the post it's not working properly anymore.
The detected result I get always has asterisks in it like this: [Attention(exceptionCode:-20111)] *ttp*//**ca*h*st*9*02/*entalobje*ts*book**98420*d*6b**-4***-9e***6*d796*0c*55
I already tried reinstalling the library and everything but I can't get it to work.
vision-camera-dynamsoft-barcode-reader has an internal dependency on DynamsoftBarcodeReader SDK and it needs an active license, which I found out in their other examples. In all their examples, public license are used which has an expiration date.
Due to this reason, I made a switch to vision-camera-code-scanner. This was already suggested in Community Plugin List of VisionCamera.
Hope this helps!

WKWebView loading local HTML require HTTPServer

I have website download to the iOS device locally run in WKWebView. I checked the website written to load JSON to construct the page. It requires an HTTP server support. I have a question that can WKWebView can support this scenario and how to code it? Many Thanks.
I have been facing a similar issue. UIWebView never had this problem, as it seemed to run a server in the background, so therefore constructing a page through json was never an issue. WKWebView, however, does not seem to be able to do this. One possible solution is to use a framework called Swifter that can be installed using CocoaPods. It basically emulates a server, so may make loading json in WKWebView a possibility.
https://github.com/httpswift/swifter
However, trying to use it myself, it seems to have problems with the latest Xcode 9 and Swift 4. If it gets sorted soon, it may solve your issue.

How to get Swagger UI to work based on documentation guide? (even the example)

I am trying to use Swagger UI to document our node.js API, so I went to http://swagger.io/docs/, down to Swagger UI Documentation -> Usage, to find this
Now, this is not the only place that provides these instructions, there are dozens of blogs & tutorials saying the same thing, so that's exactly what I did.
Cloned the repo, went into /dist/ and ran the /dist/index.html and all I get is an empty page with an error:
I'm slowly going crazy now as I can't find anything about it and literally every place I looked just has the same, copied, instructions with nothing else provided (like what could go wrong? you just open a file...)
Any help or explanations are much appreciated!
P.S. for some reason opening the /public/index.html works (mentioned nowhere on the www)
I think this is bug in new version of swagger-UI. This is fresh release and they are still modifying and fixing bugs.
Look here: Swagger-ui cannot access JS scripts. This seems to be similar problem, maybe it will help you.

Flickr background download session failed: You do not have permission to access the requested resource

I have a school assignment where I need to use this project: http://web.stanford.edu/class/cs193p/cgi-bin/drupal/system/files/sample_code/Photomania_2.zip
When I first downloaded it, it worked fine. I was working on it one day, when I got this message: "Flickr background download session failed: You do not have permission to access the requested resource."
I didn't know how to fix it, so I went back and downloaded it again to see if I did something to the code that caused that I got that error. When I downloaded a fresh copy of the photomania application, I would yet again get that error.
Does anyone know how to fix this?
Did it stop working on June 27th? The Flickr API went SSL-only on that day. That project probably needs its API endpoints updating to use SSL. I'd ask your tutor about that. Or just try updating all the API endpoints you can find to use the appropriate https: equivalents, as described in that blog post.
I just encountered the same problem. Matt hit the nail on the head. Make sure you add in your API key and do a find/replace to make all "http:" references "https:".

How to pass data in body of a HttpConnection in blackberry

Actually I want to pass data in body of a httpconnection.
Using apache httpclient library in blackberry, integrated jar file in my project but getting compilation error while running my project.
Kindly updated me on the same.
I have not tried using Apache HttpClient lib in a BB project before, because I did not for a moment think it would work...
In short, you need the code to be compatible with J2ME, and compilable using the RIM tool chain. And then we get into other problems....
First of, be aware that networking in BlackBerry is NOT as straightforward as one might wish.
Have a look at this video for the back ground theory: Networking Transports on the BB Platform
Ok, then for some code (I assume here you already went through the trouble of obtaining an HttpConnection):
byte [] bodyBytes = getBodyBytesFromSomewhere();
OutputStream out = httpConnection.openOutputStream();
out.write(bodyBytes);
out.flush();
out.close();//If you are done, which I'm guessing you are
The above code is of course very simplistic, and completely ignores all the many, many errors that will occur during network IO.
I would suggest you also look at this API,this forum entry,and this one. OS6.0 also introduced a new HTTP Connection API - can't find a link for that right now (sorry!)

Resources