0

我正在使用 xamarin 表单我正在尝试使用 xamarin.Auth 在数据库中保存一些信息...当我在 android 中执行此操作时一切正常...但在 ios 中我收到此错误...

> Xamarin.Auth.AccountStoreException: SaveAsync error = error = Could not save account to KeyChain: -34018
Add Empty Entitlements.plist 
 File /+ New file /+ iOS /+ Entitlements.plist
SecKeyChain.Add returned : -34018
1. Add Keychain Access Groups to the Entitlements file.
2. Turn on the Keychain Sharing switch in the Capabilities section in the app.

我在后面的 pcl 代码中使用这些行:

        account.Properties.Add("teste2", "1");
        account.Properties.Add("teste1", "usereee");
        AccountStore.Create().Save(account, "clastech_montana");

在此处输入图像描述

这就是我所做的一切......我搜索了很多,但我不知道如何打开钥匙串,或者我所做的一切是否正确......请,如果可以,请帮助我!

在此处输入图像描述

没有地方可以启用

4

1 回答 1

1

在您的 iOS 项目中,打开 Entitlements.plist,然后选中“启用钥匙串”

于 2017-08-16T20:06:46.440 回答