Sometimes, the scene has not become active by the time viewDidAppear is called. In that case we do not find a foreground scene here, and the alert cannot be shown. This is illustrated by a workaround where checkForUpdate is triggered from the SceneDelegate's sceneDidBecomeActive instead.
[REQUIRED] Step 1: Describe your environment
CocoaPods
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
Storyboard
checkForUpdate
fromviewDidAppear
Expected behavior: on first launch and on subsequent launches before signing in, the SDK should show the "Enable new build alerts" alert.
Actual behavior: It is inconsistent. Often the alert will show up on first launch, but not on subsequent launches. Sometimes not even on first launch.
Relevant Code:
Debugging the SDK locally, the issue appears to be with this line: https://github.com/firebase/firebase-ios-sdk/blob/f920f2feaad50aa7d6a196e956574b21fcab927a/FirebaseAppDistribution/Sources/FIRAppDistributionUIService.m#L208
Sometimes, the scene has not become active by the time
viewDidAppear
is called. In that case we do not find a foreground scene here, and the alert cannot be shown. This is illustrated by a workaround wherecheckForUpdate
is triggered from the SceneDelegate'ssceneDidBecomeActive
instead.