I'm just starting off with RestKit for iOS.
after figuring out some concepts and head-points for the RestKit, I've moved to start some practical training on RestKit. But what I've found is all the examples and the tutorials about RestKit are outdated and there is no example on the new version .
What i want is a small and simple example on how Restkit deal with JSON (Request and Response) and how to use ObjectMapping 2.0 (live example)
I've been reading through this web page since 3 days and i came over all of it's stuff and acquire a good amount of knowledge about it, but still with no benefit for what I want.
Thx in advance
You best place to start is download restKit from github and working through the examples that are built in.
https://github.com/RestKit/RestKit/tree/master/Examples
That is a good place to start and generally kept up to date.
Blake has written a great writeup at https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md I don't know if was update to handle the very recent release but it certainly worked on the previous one.
Related
I'd like to migrate from AFNetworking to Alamofire in a grown app. Since the app is quite big we think a step by step migration would contain less risk.
Nevertheless we have some concerns regarding:
Sessions
Security (Pinning etc.)
Observers / Listeners
Queues
Caching
...
Does anyone has experience with mixing AFN and Alamofire in Swift apps? I am also grateful for reports of problems you faced running both frameworks in parallel.
Thanks
It's possible and I've done so many times. You should try it and see what issues you run into and ask specific questions about them.
May I suggest you should stick with AFNetworking. Having two frameworks that do the same thing isn't always desired event in short term. AlamoFire is better if we in Swift only project. If you have 90% ObjC, it's just not ideally. And the result could be a lot of hidden bugs.
I have a GraphQL service that I need to hit from an iOS app, and I'm trying to survey what my options are for client libraries geared towards this purpose. My initial impression is that there are not many good options out there, and I'm a little surprised by this since Facebook's mobile app is always cited among the motivational material for GraphQL itself.
What follows is my current understanding of my options. My questions is: what client library options am I overlooking? I'm also curious if you were to imagine the ideal GraphQL client library for iOS, what might it look like?
Just Alamofire, AFNetworking, or NSURLSession directly, passing in lovingly hand-crafted Query Documents and spelunking through a Dictionary representing the resulting JSON, or
Chester
GraphQLicious
Swift-GraphQL
This question was asked a long time ago - I think today the standard answer to this will be to use Apollo Client.
It uses a similar API as the Apollo Client on the web and has a couple of really nice features:
Static type generation based on GraphQL Queries & Mutations
Normalized cache
Query watching & automatic UI updates
Manual store updates
It has not yet reached 1.0 but overall is a super promising project!
Here are some resources that should help you get started:
Apollo iOS Quickstart
Apollo iOS on GitHub
Ray Wenderlich GraphQL Tutorial
Learn Apollo iOS Track
I would not build queries by hand, and I think both Chester and GraphQLicious would be fine for you.
If I had to imagine the perfect library, it should not only build queries but also parse the result into Swift objects. This, as you may know from JSON parsing libraries, is not a small task and that's why most of the GraphQL-Builder libraries don't do it.
Disclosure: I'm one of the guys behind GraphQLicious
I need to implement basic RESTful functionality in my app e.g. post/get/delete + json parsing.
What would you suggest to use as a framework:
1) Resty http://projects.lukeredpath.co.uk/resty/ (ARC?)
2) http://restkit.org/ (ARC?)
What the advantage of each of them?
The reason I am asking is because yesterday i implemented some RESTful features using ASIHTTPRequest, but today I read is not being supported anymore :(
One more thing, I have heard there is a build in JSON support in iOS5 SDK (GCD Dispatcher or something like that), would it work for iOS4 client? (is it compile time or run-time dependency?), and can it do post/get requests?
Depends on your requirements.
If you just need some RESTful communication with a server then Resty isnt too bad (Though I never used it, it looks straightforward).
Restkit on the other hand is one powerful package because of 1 ultimate feature. Integration with core data. Restkit is able to parse Json responses, make them into objects and save these objects to core data with minimal coding out of the box. This makes it highly useful in case this is the type of functionality you are looking for.
I would encourage you to define the functionality you need and have a look at the frameworks. If it basic stuff, as you say, then one can argue that Restkit may be too powerful.
As for the inbuilt JSON parsing library, well it is way down the list in priority. These framework already includes a Json parser and they work pretty well. I would seriously consider the advantages before I go on to retrofit these packaged frameworks with a JSON parser of choice.
I am trying to incorporate RestKit into my iOS app but I have been unable to locate a beginner's guide to this API. I tried to follow the GitHub examples but they are not working for me.
Object Mapping is one of the prime reasons to use RestKit, you can read about it at https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md
An awful lot of the tutorials on the web refer to the older architecture, this document covers the latest stable build.
I am trying to use WSDL and SOAP with my iOS application. And I am desperate. Seems the 2 code generators, Sudz.com and WSDL2OBJC are not suitable. One has TONS of memory leaks, and the other one has other minor problems.
I want 3 things:
1) A test WSDL file for learning, and a test service wrapped around it. I couldn't find any, no matter how hard I tried.
2) A good tutorial on the matter. After a lot of searching, I still haven't found any good one.
3) A little more guidance on what to do, please.
Hi Christos: I wrote several WSDL2Objc tutorials here http://brismith66.blogspot.com/search/label/iPhone%20Development I use various publicly accessible services for the samples. I hope my tutorials fall into your "good" category :-)
Regards,
Brian