我正在尝试使用以下代码获取记录修改日期但是在调试时我没有在CKAsset中找到日期:
let cloudContainer = CKContainer.defaultContainer()
let privateDatabase = CKContainer.defaultContainer().privateCloudDatabase
let wellKnownID: CKRecordID = CKRecordID(recordName: “1”)
privateDatabase.fetchRecordWithID(wellKnownID, completionHandler: {
results, error in
if error == nil {
let databaseAsset = self.database!.objectForKey("database") as! CKAsset
regisrationAccount.iCloudDatabase = databaseAsset.fileURL.path!
println(databaseAsset.valueForKey("size")?.description) // I get the size but there is no modified date with in the object
println(databaseAsset.description)
} else {
println(error)
}
})