iCloud获取记录修改日期 - Swift

时间:2015-08-27 06:17:32

标签: ios swift icloud cloudkit

我正在尝试使用以下代码获取记录修改日期但是在调试时我没有在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)
        }
    })

http://i.stack.imgur.com/BPnfn.png

0 个答案:

没有答案