How to restart the application using Xamarin.Forms

Robert Achmann picture Robert Achmann · Nov 27, 2014 · Viewed 7.1k times · Source

If I manage a session (any concept of a session is suitable) in my app, and I deem that the session has expired, for whatever reason, how do I programmatically restart the application, universally for iOS, Android, WinPhone?

Answer

Jason picture Jason · Nov 27, 2014

You can't explicitly restart an App - iOS specifically prohibits this, and there is no universal mechanism to do this on other platforms. If you determine that the session has expired, you will need to prompt the user to login, and do any initialization manually.