There is a written application on swift 4, which requires a connection to the database, for example, for registration or authorization. For localhost all php requests are written and work as it should.
What needs to be done (read) so that the database is not on the local server, but on the remote one?
Just copying files to a remote server does not work, you need to write something else that I do not know. It is possible to use this server here wp.gpdhost.com. XAMPP was used as a local server.