2017-08-16 46 views
0

我正在使用xamarin形式 我想使用xamarin.Auth來保存一些信息在數據庫中...當我在android中做到這一切都發生好... 但在ios我收到此錯誤...xamarin形式的keychain配置

> 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"); 

enter image description here

這一切都我做了...我搜索了很多,我不知道如何打開鑰匙鏈,或者如果我所做的一切正確.. 請,如果可以的話,幫幫我!

enter image description here

沒有一個讓

回答

1

在您的iOS項目,打開Entitlements.plist,並勾選「啓用鑰匙串」

+0

我張貼這種here..where的照片的地方是嗎? –

+0

並且您可能還需要確保您的entitlements.plist「參與」您正在創建的包中。轉到Project/[YourProjectName]選項/構建/ iOs軟件包簽名並將自定義權利設置爲Entitlements.plist – ubienewbie