fito
fito

Reputation: 43

Any way to remote access to postgresql with xcode for ios application?

any one who try to connect postgresql with xcode for ios application? What should i try? what do you suggest?

Upvotes: 2

Views: 4166

Answers (1)

Quentin
Quentin

Reputation: 944170

The usual approach is to avoid making a direct connection but to route everything through an HTTP based API.

The iOS application then only needs to perform HTTP requests and parse the responses (which you can format using JSON).

You can write the HTTP API in the server side language of your choice.


It is possible to connect directly to the database, but you would have to write or otherwise acquire a Postgresql client library for iOS (which appears to exist, thanks Craig) and expose the database on the network (if the iOS application is going to connect over the Internet that means exposing the database directly to the Internet, which is generally considered to be a Bad Idea).

Upvotes: 4

Related Questions