An error occurred when accessing the keychain
I didn't add the Team ID prefix before my App ID, so it didn't work. You need to have an Apple Developer Account and a Team ID in order to do this, like this:
Auth.auth().useUserAccessGroup("XK********.com.matkonit.SharedItems")
Xcode 11 Firebase auth for Mac app has error An error occurred when accessing the keychain
Add Keychain Sharing Capability
to the target's build settings. More context here.
Click the + Capability and then choose Keychain Sharing Capability
Error when accessing keychain with Firebase iOS 10
As mentioned in the link of the first answer there is a workaround:
- Go to your *.xcodeproj
- Go to the tab "Capabilities"
- Activate "Keychain Sharing"
Btw, is there an issue tracker for xcode?
Firebase Auth Signout Error - Swift
You need to enable the Keychain Sharing entitlement.
From the Project Navigator, go to your project settings and find your target. Under the Capabilities tab, turn on Keychain Sharing.
I had the same problem trying to create a new user. I'm not sure exactly why Firebase needs this permission now, but it works.
Swift cross-app authentication is not working
After a bit of discussion with Firebase support, the issue that I had was that the keychain access group needs to read like this:
<TEAM_ID>.<APP_NAME>.<GROUP_NAME>
There is also a bug in Xcode where when you add this via the capabilities section, $(AppIdentifierPrefix) is added, this is wrong. Also, the keychain access group needs to be consistent throughout the apps. Once I added fixed this everything was working fine.
Firebase swift Cross-app user sharing not working
So, after several attempts under my thoughts that it was my setup of the keychain group, it ended up being that I was calling the code too early (right after configuring the FirebaseApp), so it just failed. Moving the code out of viewDidLoad and into a method called by a method channel right before login (for the app) and before I needed the user to populate the today extension worked for me.
Related Topics
Compiler Error: Invalid Library File - Corelocation
Swift: Get an Element from a Tuple
Swift: How to Disable User Interaction While Touch Action Is Being Carried Out
Creating a Future Date in Swift with Nsdate()
How to Test That Statictexts Contains a String Using Xctest
How to Use Swift Package Manager in Xcode 9 Playground
Iaps Actually Validating the Receipt (Swift)
Swift 3 and Firebase: Retrieve Auto Id Value from Snapshot
Proper Model for Multiple Alamofire Requests for Multiple Websites
Convert or Cast Object to String
"Missing Required Entitlement" for Nfctagreadersession
Swiftui MACos Xcode Style Toolbar
Seeking an "Exit" Equivalent in Swift
Swift Calling Static Methods: Type(Of: Self) VS Explicit Class Name