You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ... inside application(_:didFinishLaunchingWithOptions:):FirebaseApp.configure()do{tryAuth.auth().useUserAccessGroup("TEAMID.com.example.group1")print("useUserAccessGroup OK")}catchlet error as NSError{print("useUserAccessGroup failed with \(error)")}
Expected output:
useUserAccessGroup OK
Actual output:
useUserAccessGroup failed with Error Domain=Foundation._GenericObjCError Code=0 "(null)"
My analysis
It seems like there is some async setup going on which prevents this from working. If I wrap the useUserAccessGroup call with
DispatchQueue.main.asyncAfter(deadline:.now()+1){do{tryAuth.auth().useUserAccessGroup("TEAMID.com.example.group1")print("useUserAccessGroup OK")}catchlet error as NSError{print("useUserAccessGroup failed with \()")}}
or move it out of application(_:didFinishLaunchingWithOptions:): and call it later it works as expected.
I think this is a bug, but if it's not, I would suggest improving the error message to something more helpful.
The text was updated successfully, but these errors were encountered:
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
Expected output:
useUserAccessGroup OK
Actual output:
useUserAccessGroup failed with Error Domain=Foundation._GenericObjCError Code=0 "(null)"
My analysis
It seems like there is some async setup going on which prevents this from working. If I wrap the
useUserAccessGroup
call withor move it out of
application(_:didFinishLaunchingWithOptions:):
and call it later it works as expected.I think this is a bug, but if it's not, I would suggest improving the error message to something more helpful.
The text was updated successfully, but these errors were encountered: