Unlike Chrome or Android’s autofill, iOS autofill doesn’t touch userId and password fields. Any events like onChange or onKeydown are not called. Therefore, ngModel is also not updated. Oh my god it’s so frustrating… I have rejected from AppstoreConnect for this reason.
To avoid this problem, there are several solutions.
- Don’t publish to Appstore. (Best)
- Wait until iOS triggers all Autofill fields (Good)
- Avoid Autofill (change input type=”password” to “text”)
- Directly read the input fields (nativeElement)
I prefer the first or second one but that was not possible, so I had applied the third one then I passed the App review. But I felt sorry to users who like to use Autofill, not even on iOS but also on Android, Chrome, or anything else. So I applied the last one.
You know I really like my new iPhone 11 and I think it is so elegant. But I don’t think iOS development is not like that. When I autofill on the userId field, it triggers on the userId field’s event only. When I autofill on the password field, it triggers on the password’s event only. It doesn’t triggers both fields! Oh my apple please don’t…