Update your library,
updated now and in ServerTrustPolicy file i can see:
`
private func trustIsValid(_ trust: SecTrust) -> Bool {
var isValid = false
var result = SecTrustResultType.invalid
let status = SecTrustEvaluate(trust, &result)
if status == errSecSuccess {
let unspecified = SecTrustResultType.unspecified
let proceed = SecTrustResultType.proceed
isValid = result == unspecified || result == proceed
}
return isValid
}
`
Please ensure you are using the appropriate version of Xcode for the version of Alamofire you're trying to use. Alamofire 4 requires Xcode 8, Alamofire 3.5 is compatible with both Xcode 7.3 and Xcode 8 with the "Use legacy Swift version" setting set to true.
I am using Appropriate version. I tried Alamofire 3.1.4, 3.5.0, 3.5.1 with Xcode 8. Use Legacy swift version = YES. Still unresolved identifier error is appearing !
Any other solution ?
Try Below Code. This worked for me. You've to capitalised enum type for swift 2.3 and Smaller for 3.0
var result = SecTrustResultType.Invalid
let status = SecTrustEvaluate(trust, &result)
if status == errSecSuccess {
let unspecified = SecTrustResultType.Unspecified
let proceed = SecTrustResultType.Proceed
isValid = result == unspecified || result == proceed
}
return isValid
Most helpful comment
Try Below Code. This worked for me. You've to capitalised enum type for swift 2.3 and Smaller for 3.0