You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alamofire/Source/ServerTrustPolicy.swift:243:41: Use of unresolved identifier 'kSecTrustResultInvalid'
The text was updated successfully, but these errors were encountered:
RamboLouis
changed the title
Use Xcode 8 to open the project as the following error:""
Use Xcode 8 to open the project as the following error:"Use of unresolved identifier 'kSecTrustResultInvalid' "
Sep 15, 2016
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
Alamofire/Source/ServerTrustPolicy.swift:243:41: Use of unresolved identifier 'kSecTrustResultInvalid'
The text was updated successfully, but these errors were encountered: