gheorghedarle / Xamarin-ToDoApp

Todo App is a simple to do app developed with Xamarin
MIT License
129 stars 36 forks source link

An error occurred when accessing the keychain on IphoneSimulator #7

Open mruani opened 3 months ago

mruani commented 3 months ago

Hi Darle, I wanted to reach out and express my admiration for your app. I've followed your setup instructions diligently, and everything works flawlessly on Android. However, I've encountered an issue when attempting to log in or sign up using the iPhone Simulator:

Foundation.NSErrorException: Error Domain=FIRAuthErrorDomain Code=17995 "An error occurred when accessing the keychain. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo dictionary will contain more information about the error encountered" UserInfo={FIRAuthErrorUserInfoNameKey=ERROR_KEYCHAIN_ERROR, NSLocalizedFailureReason=SecItemAdd (-34018), NSLocalizedDescription=An error occurred when accessing the keychain. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo dictionary will contain more information about the error encountered} at ToDoApp.iOS.Auth.FirebaseAuthentication.RegisterWithEmailAndPassword (System.String username, System.String email, System.String password) [0x00040] in /Users/.../Projects/Xamarin-ToDoApp/ToDoApp/ToDoApp/ToDoApp.iOS/Auth/FirebaseAuthentication.cs:37

Could you please advise if there are additional steps I need to take, such as registering Certificates, Identifiers, and/or Profiles on the Apple developer account? Thank you in advance.

gheorghedarle commented 2 months ago

Hello @mruani I didn't test the app on iOS, but yes you will need at least a developer certificate from developer.apple.com. To fix the problem you probably need to check Keychain in the Entitlements.plist and add Entitlements.plist for your build configuration for iPhoneSimulator.