7

In a Swift app, how does one connect to a Postgres database server?

How to do the equivalent from Swift?

2
  • 1
    You can call any C code in Swift. Commented Mar 26, 2016 at 11:45
  • @Basil Bourque have u found any solution, if yes please share it with us Commented Jun 14, 2016 at 15:48

2 Answers 2

6

You may use Postgres C API libpq. However, at least a thin layer of Swift will be needed to make it object-oriented and ARC compliant. An example implementation of that layer may be like so: stepanhruda/PostgreSQL-Swift.

Sign up to request clarification or add additional context in comments.

Comments

1

You can try to use PostgresClientKit

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.