'ios app stuck in launchscreen when click on inactive push notification in xamarin form ios

I'm working in Xamarin form ios. My issue is when click on push notification received when its inactive/killed,then its stuck in launchscreen.

I have implemented Video as splash screen.

the scenario for the issue is, step 1)launch the app.. Click on received notification(foreground)-> it will redirect to specific page(ex notification list page). step 2)now close the app, Click on received notification(inactive)-> open the app with white screen and stuck.... or step 2) close the app, once got the inactive push notification then directly click on app icon , it will stuck

when it work : if I don't click on foreground push notification(step 1) , and only click on inactive push notification then its work fine.(redirecting to notification list page).



Solution 1:[1]

Add DispatchQueue.main.asyncAfter before you start playing video:

DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
    self.startPlayingVideo()
})

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MHSFisher