在运行时遇到Document文件夹的保存问题。文档文件夹仅保存会话的新数据,并在应用程序重新启动后反转回旧版本。只有签名的ipa才会在模拟器上发生这种情况。是权限问题吗?
static public func updateJson() -> Bool{
do{
//try FileManager.default.replaceItemAt(Constants.getJSONPath(), withItemAt: Constants.getDataSyncJsonPath())
try FileManager.default.removeItem(at: Constants.getJSONPath())
try FileManager.default.copyItem(at: Constants.getDataSyncJsonPath(), to: Constants.getJSONPath())
print("Updating Json")
return true
} catch {
print(error)
return false
}
}
谢谢, 布赖恩