Unfortunately this morning my Xcode has been upgraded to version 7 and the iOS app I developed with http now wants https. So, following many tutorials, I set up my MAMP server to use https / ssl, creating a dummy certificate. Now in my iOS app urls are the following:
static var webServerLoginURL = "https://localhost:443/excogitoweb/mobile/loginM.php" static var webServerGetUserTasks = "https://localhost:443/excogitoweb/mobile/handleTasks.php" static var webServerGetUsers = "https://localhost:443/excogitoweb/mobile/handleUsers.php" static var webServerGetProjects = "https://localhost:443/excogitoweb/mobile/handleProjects.php"
and they work fine if I try to access them in my browser. I was used to access the database and php files using NSURLSession.sharedSession (). DataTaskWithRequest (), which now causes an error in the header. For example, here is the line where the error occurs:
if let responseJSON: [[String: String]] = (try? NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions())) as? [[String: String]] { ... }
and this is the complete error message:
2015-09-21 16:41:48.354 ExcogitoWeb[75200:476213] CFNetwork SSLHandshake failed (-9824) 2015-09-21 16:41:48.355 ExcogitoWeb[75200:476213] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824) fatal error: unexpectedly found nil while unwrapping an Optional value
I would like to know how to fix this. I read some useful answers here, but there are many things that I still do not understand, and if someone helps / explains me, I would be very grateful.
Lory lory
source share