我正在使用 Xamarin AccountStore/Account 来保存有关我的应用程序用户的信息(他们的详细信息在远程服务器经过身份验证后存储)
如果详细信息被写出,应用程序被杀死然后重新启动,这会很好。它找到现有的帐户存储。
但是,如果应用程序已更新(因为我在 Xamarin Studio 中进行了一些更改并重新部署),那么它不会为我的服务找到任何帐户。
这就是我请求帐户的方式:
var accountStore = AccountStore.Create(this._context);
var storage = accountStore.FindAccountsForService(this._serviceId);
var account = storage.FirstOrDefault(x => x.Username == username);
这就是我坚持帐户设置的方式:
accountStore.Save(account, this._serviceId);
有谁知道为什么更新应用时找不到AccountStore?
知道它在设备上的存储位置吗?
谢谢!