Hosting a web service for an iPhone App - iphone

I need to write a fairly simple Delivery Tracking application. The device needs to know information about the 'matters' such as status (delivered/awaiting delivery), type (for delivery/for pickup), address, payment accepted etc.
The iPhone part of the app seems very simple but in terms of hosting some kind of web service is the part I am unsure about.
Does Apple have some kind of service or recommending way of handling this?
The web service would need to store all the information about the matters and receive updates from the device when matters are delivered and then there is a possibility that new matters could be sent out manually from the depot.
These are the parts I am unsure about - any ideas?

There is no Apple recommended way or service. For a similar system to the one you are proposing I have a Ruby On Rails (http://rubyonrails.org/) backend application with MySQL database hosted by a third party. It took me a couple of weeks starting from no knowledge of RoR to get the Rails App and database up and running. I recommend Appress's Beginning Rails 3 as a good book to start with. You can develop and run Ruby On Rails on MacOSX and easily port your app to a Linux server when it sufficiently developed.
There are other web-services frameworks such as PHP or ASP.NET which you could use so long as they return data in the form of JSON or XML.
The Ruby on Rails app can render JSON or XML when the iPhone app sends a request via NSURLRequest. I'm using Objective Resource (http://iphoneonrails.com/) which takes care of a lot of work connecting to RoR backend but you can use the many open source JSON frameworks such as TouchJSON (http://github.com/schwa/TouchJSON) or use NSXMLParser, an Apple Objective-C class, if your request returns in the form of XML.

Related

Can a ionic app fetch data to a website's database?

i was planning to make a project out of my curiosity , to make a ionic framework mobile app that fetches data from a website's database (which i already made). Is it possible? How? i have no idea how to do that because im still on the learning process(novice)
Yes you can do this and its possible. First of all you need to create a connection that you Ionic App can communicate with your Website.
That is Called an API. If we dont use any big tech Words to explain this.
The Common practice is build a REST-API first.
Its a Link, and when you goto the link, the link will give you data in a Format JSON or XML. So your App can Parse the JSON/XML Data and display in your Ionic App.
Example.
www.yourwebsite.com/getusers
www.yourwebsite.com/adduser
you will call the first link from your App in GET protocol and this will give u a list of users in JSON Format.
you will call the second link from your App in POST protocol with User Parameters and this will add a user and Will give you Success or Error Json/XML Response.
So first you need to learn a bit about REST-API and how to build them. You can build them in any language.
REST API FOR BEGINNERS
Then plan which language is the best for you and follow up a good tutorial.
And Finally follow this on how to call an API from IONIC
CALL API FROM IONIC
Cheers XD
A web service is a service offered by an electronic device to another electronic device, communicating with each other via the World Wide Web. In a Web service, Web technology such as HTTP, originally designed for human-to-machine communication, is utilized for machine-to-machine communication, more specifically for transferring machine readable file formats such as XML and JSON
Using PHP and MySQL with Ionichttp://masteringionic.com/blog/2016-12-15-using-php-and-mysql-with-ionic/
Creating an Ionic App with MySQL and Backand

Database driven ios app - first steps

I'm about to start work on my first app which will be an internal release to gather customer information at a trade show.
I'm hopefully looking into using air for ios or maybe one of the various html/js frameworks to develop this app as an alternative to learning C.
ideally I would do it with some server based php > sql to store and share gathered information between a fleet of iPads, unfortunately due to the population of this trade show there will be no guarantee that i can maintain a wireless connection so need to prepare for these apps all being local access only.
in which case, how would you recommend going about the saving/reading of the stored data, and also how to sync it up with a sql server and then back to the iPads each night.
Did you try PhoneGap? It is an HTML5 app platform that allows you to author native applications with web technologies, in other words it will let you make an iphone app without having to learn C.
People have written tutorials and plugins for storing data locally.
PhoneGap basically wraps a web app hence you can use AJAX for sync with server as and when needed. This article might help.
We explored PhoneGap and found it very useful. and easy too. hope this helps you.

what are the issues with iphone web service?

I just started doing some reading (new to xcode/iphone development) into web services and most articles say that apple has really dropped the ball on this ... why is this :S?
It's because Apple doesn't provide any Web-Service API, it's agnostic on this point and you basically have to hardwire anything with URL Requests.
Fortunately, there are third-party libraries out there like ASIHTTPRequest and RESTKit that can make your life easier when coding an app that needs to talk to a Web Service.

objective-c iphone programming : remote connection database iphone

i simply want to make an iphone application with a remote database. For exemple facebook iphone application, they have all access to a huge database. Are they using Mysql ? Because i heard that mysql is not secure through iphone and app store may reject it. Can someone help me figure out whats the best to use.
What all those apps are probably using is a RESTful web service endpoint that is in turn backed by a large database. There are a lot of libraries for creating web services regarding of what application stack you're using.
If you're using MySQL, you'd write a Python/Ruby/Whatever-you-choose backend component which actually connects to a MySQL instance, then reformat the results as a web-service endpoint. SOAP can work if need be, or (in my opinion) a better option would be to write a simple JSON service that your iPhone app can parse. There are lots of JSON/WS iOS libraries that are a google query away.
Apple will not be bothered what database you are use remotely (will be accessed through defined API's).

Web service advice for an iPhone app

I am currently working on an iPhone app that will have a user log in, enter a workorder or building, and the app will display workorder/building information. The user will then be able to edit some of the data and submit it to the server. The backend database is a MySQL server. What is the best web service to use for this situation? I've been reading about SOAP, JSON, etc. but I honestly haven't found a good description of the pros/cons of each and how well they work with an iPhone app. Any and all help (or links to useful reading) would be greatly appreciated!
Ruby On Rails or PHP is your best bet for the web services layer that goes between the phone and the MySQL and go for JSON as that is the most commonly IPhone Web service data format as it is the one that requires the least amount of data upload by the phone. Touch JSON is commonly used IPhone framework for this.The RoR or PHP web services layer serves up JSON data based on URL requests by the IPhone. There's loads of stuff on this if you google which I did when faced with a similar problem.