iOS Password Autofill for inputs


I am trying to implement this functionality into my Ionic APP. This is my HTML code:

<ion-input #username id="user-text-field" name="username" autocomplete="username" no-margin margin-bottom formControlName="username" type="text"
                           placeholder="{{ 'Login.username' | translate }}">
                <ion-input id="password-text-field" name="password" autocomplete="current-password" no-margin margin-bottom formControlName="password"  type="password"
                           placeholder="{{ 'Login.password' | translate }}">


When I focus into a ion-input the ‘password bar’ appears to select a password, If I click into some stored password then:

Ionic v3:
Nothing occurs until I focus out and focus in again. When I focus again the username and password are filled into.

Ionic v4:

Username and password are correctly filled into

On ionic v3 I have tried to programatically focus into the inputs and also get the values some time after the filled but the inputs are ‘empty’ until they are manually focus again.

Some help/idea about this problem?

Another question is, in case that the login are succesfully, where/how can I store the credentials to use it with successive logins on ionic apps?

Thanks a lot