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
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' "[/+]on 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
jpm-esokia, AhmedAmineZribi, kuchmiyalex, zazk and zane686
Activity
[-]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' "[/+]RebeccaB89 commentedon Sep 15, 2016
Update your library,
updated now and in ServerTrustPolicy file i can see:
`
private func trustIsValid(_ trust: SecTrust) -> Bool {
var isValid = false
`
jshier commentedon Sep 15, 2016
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.
mythical-programmer commentedon Oct 17, 2016
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 ?
KiranJasvanee commentedon Oct 20, 2016
Try Below Code. This worked for me. You've to capitalised enum type for swift 2.3 and Smaller for 3.0