As stated above, the way to go about this is using GET/POST request scripts. I personally use PHP for these. For example, your script might look like this.
$username = $_POST['username'];
$password = $_POST['password'];
$query = "SELECT * FROM users WHERE username='".$username."' AND password='".$password."';";
$result = mysqli_query($db, $query);
if ($row = mysqli_fetch_assoc($result)) {
// This means a match was found in the DB
}
I ususally setup my login scripts with much more security but this is the idea behind it.
It's easy to send a GET request from objective-c using NSURLConnection
NSURLConnection *request = [NSURLConnection requestWithURL: @"http://www.website.com/script.php?username=user&password=pass"];
This will send a GET request to the specified URL. You would then have to change the $_POST[''] values to $_GET[''] in the PHP script.
Sending POST requests are a little more complicated in objective-c but follow a similar pattern.
I've recently started using ASIHTTPRequest to perform all of my GET/POST requests. I recommend you take a look at that. It's an open source library for this exact problem.
http://allseeing-i.com/ASIHTTPRequest/How-to-use