Improving the effectiveness of Xamarin forms

I am developing a Xamarin forms application (Android and iOS) and checking the login status at application startup and assigning appropriate values ​​if the user is already logged into the application. This process takes 6 seconds to load the first page in our application. I performed Xamarin Auth to save user credentials at login. Below is the procedure for storing and retrieving information about the registered user that I used in the application.

https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/general/store-credentials/

A snippet of the code that is used in the OnStart method of the App.cs file:

protected async override void OnStart() { LoginType login = DependencyService.Get<ILoginCredentialStorage>().LoginExists(); this.MainPage = new NavigationPage(new HomePage(login)); } 

Could you suggest me to reduce the loading time of the first page in the application?

Hello,

Vijay

+5
source share
1 answer

You probably need to move the credentials to enter the login page and leave it as late as possible (for example, OnAppearing, not the constructor) so that you can show the progress indicator.

Here are some more tips.

+1
source

Source: https://habr.com/ru/post/1272682/


All Articles