'Going to a page during WillEnterforeground in xamarin
I am working on a different iOS app that is built on Xamarin App. I have a requirements that when an app is idle and the user open his app again he will redirect to login page if his session is expired. Is there a way to redirect to a login page in Xamarin in the WillEnterForeground event AppDelegate?
public async override void WillEnterForeground(UIApplication uiApplication)
{
var msalService = new MsalAuthService();
var isUserCurrentlyLogin = await msalService.IsCurrentlyLogIn();
if (!isUserCurrentlyLogin)
{
// Go To Login Page
}
else
{
// stay on the current page
}
base.WillEnterForeground(uiApplication);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
