Creating RESTful API for your self hosted iOS App on your domain’s sub directory with this easy guide. Optionally you can use a PaaS like Red Hat OpenShift or Heroku Cloud to host the App. The reason behind using a Cloud based server is nothing but the service continuity, Scalability and flexibility. Regular readers can recall an article – Scalability and Service Continuity Are Not Equivalent in Cloud Computing. We already pointed that Flexibility and Scalability are the Key Benefits of Cloud Computing. Other important related articles are on explanation of REST API or Representational State Transfer API and CocoaRestClient to test the Cloud based App.
This article on creating RESTful API for your Self Hosted iOS App has originated from Blueprint of Creating an iOS App from RSS Feed. We know the vulnerable points!
Creating RESTful API for Your Self Hosted iOS App : Understanding the Hosting Part
Please read the article Blueprint of Creating an iOS App from RSS Feed to understand what basically we want to do. In this website, there are lot of guides (including video guides) on Red Hat Open Shift and Heroku Cloud. Search within this website to understand how to use these free resources. This article is basically on creating RESTful API for your self hosted iOS App, it will be a kind of offtopic to discuss about the hosting part here. You can use a subdomain for this purpose, just to give you a hint.
Creating RESTful API for Your Self Hosted iOS App
All kind of API need to accept requests. So, we should create a PHP in that way. We can just use the HTTP ways like GET, POST or PUT, and DELETE methods, they are more than enough for our purpose. No, no, you need not to fear, ready-made code is available too :
For now, use this one (we will create a suitable and push to GitHub later), but read the readable text carefully, otherwise it will not work. This one is a very simple App :
All are ready, push to Open Shift or Heroku and test the result. On the next article, we will combine this API with the iOS App web server front end. None can track your users if you follow this way.Tagged With Building a self hosted ios app