I'm writing a small Postgres SQL database client app in Objective C for macOS Sierra. Just to be clear: my app will be the SQL client that will allow you to type in SQL queries and see result sets by sending the queries to a separate Postgres server instance (which may be local or remote and has nothing to do with my app).
My question: if my app is installed on a fresh/clean Mac running macOS Sierra that has no version of Postgres or Xcode installed, where will the Postgres drivers be found? Are they built in to macOS Sierra? Will they be wrapped up inside my app when it is compiled and linked? I need to be able to distribute my app to non-developers who won't have either Xcode or Postgres installed on their Macs.
I'm adding libpq.tbd as a "Linked Frameworks and Libraries" to my project's General page, that's how I'm "including" the Postgres drivers in my app's Xcode project.
On my build machine, I have a version of Postgres server installed so that the libpq headers (.h files) are available at /usr/local/Cellar/postgresql/9.5.4/include and can be seen in Xcode's headers search path. However, those were installed by Homebrew, which isn't guaranteed to be on an end user's machine. By mousing over libpq.tbd in Xcode, I see that it is located at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libpq.tbd . But that's inside the Xcode app, so where will it be on a Mac that doesn't have Xcode or Postgres installed but does have my app installed?
I guess I'm not sure what a .tbd file is and if libpq is being treated as a dynamic library or is being compiled in, wholesale and statically, into my app at link time.