How do apps pull data from a server?

Posted by:

How do apps pull data from a server?

How do apps pull data from a server? The main tool for this in Cocoa Touch is NSURLConnection. There are various third-party toolkits for specific services, but NSURLConnection is usually the underlying network connection class. There are also numerous other network APIs in iOS, but most apps that communicate with servers won’t need them.

Take a look at http://restkit.org/ and use it to access a backend service that exposes your data as a REST API.
You might want to sign up for my service http://scottyapp.com, which does the backend part for you.

How do apps pull data from a server

However, I usually use NSURLConnection, but then you’ll probably have to handle some issues such as reachability.

I used these tutorials and managed to get what you are trying to do work without too much difficulty.

Between them, they describe each step in how to do what you are attempting at each stage, the android application, the database and the web server side and has extra information included for what you can then do to process and use the received information

The only thing I would add is that the Connect android with PHP and MySql tutorial makes use of mysql_ in php which is deprecated. Much better to use MySqli which is why I included the third link.

The basic outline of what you want to do is this:

1) in the Android app make a request to a server PHP script using a class like this:

0

Add a Comment