I'm using Alamofire to communicate with an API. The url is secure, or at least what Chrome says, but I'm still getting
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
The url is https://svinbra-api.herokuapp.com
Is the certificated generated from Heroku to weak to be used in an iOS app?
EDIT
The error message tells me that I'm trying to connect through http and not httpS. But my code does different
class SCommunicator {
static var shared = SCommunicator()
private static var base_url = "https://svinbra-api.herokuapp.com/api/"
public func get(callback: (_ response: Response?) -> Void) {
// JUST TESTING CONNECTION
Alamofire.request(SCommunicator.base_url+"events").responseJSON { response in
print(response)
}
}
}
Getting error
NSErrorFailingURLStringKey=http://svinbra-api.herokuapp.com/api, NSErrorFailingURLKey=http://svinbra-api.herokuapp.com/api