使用Realm數(shù)據(jù)庫(kù)存儲(chǔ)凛虽,打不開(kāi).realm文件,如圖所示:
Please enter a valid encryption key for this realm file.
The encryption key must be entered as 128-character string of hexadecimal values.
1迁霎、使用Realm Browser打開(kāi)報(bào)上面錯(cuò)誤;
2、realm官方新推出的可視化工具Realm Studio可以查看.realm文件增淹。realm studio官方下載地址
3、realm默認(rèn)的存儲(chǔ)地址乌企,可以通過(guò)realm.configuration.fileURL打印出.realm文件在沙盒中的存儲(chǔ)地址虑润;
Realm.Configuration.defaultConfiguration.fileURL.path
4、根據(jù)存儲(chǔ)路徑找到Documents文件下的default.realm文件加酵,使用Realm Studio打開(kāi)即可看到存儲(chǔ)結(jié)構(gòu)及數(shù)據(jù)拳喻;