I use Firebase Auth in order to sign in with Google in my app, and it works fine in both iOS and Android.
My problem starts when I try to use Firebase Auth in my iOS "Share Extension"... I am new to iOS so I am not really familiar with Swift and Xcode, but as far as I understand I should
enable cross-app authentication with shared iOS Keychain in order to get the current user in my shared extension.
I have 2 targets in my project, the "Runner" and the "Share Extension" so I have enabled Keychain Sharing for both of them.
When the Keychain Sharing is enabled, I get the following error when I try to sign in using Firebase Auth:
Unhandled Exception: PlatformException(ERROR_KEYCHAIN_ERROR, An error occurred when accessing the keychain. The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo dictionary will contain more information about the error encountered, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
<asynchronous suspension>
#2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:349:48)
#3 MethodChannelFirebaseAuth.signInWithCredential (package:firebase_auth_platform_interface/src/method_channel_firebase_auth.dart:161:23)
#4 FirebaseAuth.signInWithCredential (package:firebase_auth/src/firebase_auth.dart:208:10)
#5 signInWithGoogle (package:matkonit/google_sign_in.dart:17:45)
<asynchronous suspension>
#6 LoginPageState.signInButton.<anonymous closure>.<anonymous clo<…>