Swift
Swift
Transition from Cert.GetValidFromDt to Cert.ValidFromStr
Provides instructions for replacing deprecated GetValidFromDt method calls with ValidFromStr.Chilkat Swift Downloads
func chilkatTest() {
let cert = CkoCert()!
// ------------------------------------------------------------------------
// The GetValidFromDt method is deprecated:
var ckdt1: CkoDateTime? = cert.getValidFromDt()
if cert.lastMethodSuccess == false {
print("\(cert.lastErrorText!)")
return
}
// ...
// ...
ckdt1 = nil
// ------------------------------------------------------------------------
// Do the equivalent using the ValidFromStr property
let ckdt2 = CkoDateTime()!
ckdt2.set(fromRfc822: cert.validFromStr)
}