There’s two approaches you can take here:
Talk to the database via a web service, for example, Claude31’s PHP suggestion (A)
Talk to the database directly via a client library (B)
It sounds like you want to do B. That’s relatively unusual to do in a client app, so if you search around on the ’net you’ll mostly find suggestions for A.
OTOH, doing B is quite common on the server side, so my recommendation is that you focus your search in the Swift on server space. For example, I popped over to the Server area on Swift Forums, and immediately found this.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
ps DTS is closed 21 Dec through 1 Jan.