user1763684
user1763684

Reputation: 275

How do iOS apps typically communicate with a server?

I am a Ruby on Rails developer and I have a question about iOS development.

How do iPhone applications typically interact with a server?

For example, let's say you wish to send GPS coords from the iPhone to the server to be stored or processed. How is that typically done? Is it through a typical server API (like JSON)?

Sorry for such a basic question.

EDIT: Thanks for the answers below. Now, how about pushing data from the server to the iPhone app (without a request). How is that done?

Upvotes: 1

Views: 281

Answers (3)

Cocoadelica
Cocoadelica

Reputation: 3026

I'd say that the best way to ensure delivery of data to the app from the server depends on whether you know the app is running or not. Push notification can deliver payload data, albeit in small quantities, to the app and it does not matter whether it's currently running or not. It's a big subject but thats a good start.

Upvotes: 0

Raptor
Raptor

Reputation: 54212

The communication format is usually XML or JSON via HTTP call, but it depends on your data you wish to communicate between server and app. You may use socket connection.

Upvotes: 1

Saqib Saud
Saqib Saud

Reputation: 2795

Typically, every client and server exchange information via public API's.

in iOS, we prefer, RESTful webservices that deliver JSON. (There are other options also, but we prefer this)

Upvotes: 1

Related Questions