Using Core Data to mock REST service in iOS app
For some projects, it makes a lot of sense to separate yourself from being dependent on others deliverables. At Binary Peak we often find ourselves waiting for backend implementations to be completed when doing mobile applications. Mocking a REST service so all of the application flows can be tested before the application is done is usually a good strategy to deal with that. Sometimes the backend team will do that for us, but they are often under a tight deadline and stuff like this rarely gets prioritized.
A lot of teams choose to use services like Sinatra for this. An advantage with that approach is that writing the mock code in a language like Ruby will allow you to quickly get something up and running. We’ve used tools like that to great success before but this article will describe another way of doing it that suited a particular project we were doing.Posted on