Swift
Swift
Replace Deprecated GetExpirationDt
Shows how to replace the deprecated GetExpirationDt method.Chilkat Swift Downloads
func chilkatTest() {
let cache = CkoCache()!
// ....
// ....
var cache_item_key: String? = "xyz"
// Instead of this:
var dt1: CkoDateTime? = cache.getExpirationDt(key: cache_item_key)
dt1 = nil
// Do this:
let dt2 = CkoDateTime()!
dt2.set(fromRfc822: cache.getExpirationStr(url: cache_item_key))
}