Closed
Description
[REQUIRED] Step 1: Describe your environment
- Xcode version: Xcode 12.4
- Firebase SDK version: 7.3.1
- Installation method:
Swift Package Manager
- Firebase Component: Analytics, Crashlytics
[REQUIRED] Step 2: Describe the problem
It appears that the system FaceID/TouchID authentication prompt is putting the app into a resigned/non-active state. And sending screen_view event during the prompt is ignored by Firebase SDK due to the limitation that no screen_view events are allowed when the app is not active.
The console printed out the error: Cannot log screen view event when the app is not active
.
I'm not sure what's the best way to solve this to be honest. Not sure if it's fair to assume Firebase SDK would take care of this situation.
Steps to reproduce:
Perform a FaceID/TouchID authentication as soon as the app is coming back from background while sending out a screen_view event.
Relevant Code:
LAContext().evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: "some reason") { }
Analytics.logEvent(AnalyticsEventScreenView, [
AnalyticsParameterScreenName: "MyView",
AnalyticsParameterScreenClass: "MyViewClass"
])