99热99这里只有精品6国产,亚洲中文字幕在线天天更新,在线观看亚洲精品国产福利片 ,久久久久综合网

歡迎加入QQ討論群258996829

Swift 面向協(xié)議的 Keychain 類庫 Locksmith

發(fā)布時間:2016-12-19 13:40  回復(fù):0  查看:5268  感興趣:33  贊:0   最后回復(fù):2016-12-19 13:40  

Locksmith 是一個強(qiáng)大的,面向協(xié)議的類庫,用于在 Swift 中使用 Keychain 。

示例代碼:

保存數(shù)據(jù)

try Locksmith.saveData(["some key": "some value"], forUserAccount: "myUserAccount")
加載數(shù)據(jù)

let dictionary = Locksmith.loadDataForUserAccount("myUserAccount")
更新數(shù)據(jù)

替換現(xiàn)有數(shù)據(jù),如果key不存在,則會寫入數(shù)據(jù)。

try Locksmith.updateData(["some key": "another value"], forUserAccount: "myUserAccount")
刪除數(shù)據(jù)

try Locksmith.deleteDataForUserAccount("myUserAccount")

相關(guān)開源代碼

您還未登錄,請先登錄

熱門帖子

最新帖子

?