So for iOS 13 (or higher), I noticed that setting the following properties makes iPhone to suggest you all the data:
For email ensure all these three properties are set:
emailField.autocorrectionType = .yes
emailField.textContentType = .emailAddress
emailField.keyboardType = .emailAddress
For first name and last name:
firstNameField.autocorrectionType = .yes
firstNameField.textContentType = .givenName
firstNameField.keyboardType = .namePhonePad
lastNameField.autocorrectionType = .yes
lastNameField.textContentType = .familyName
lastNameField.keyboardType = .namePhonePad
For phone number its a bit tricky:
phoneField.autocorrectionType = .yes
phoneField.textContentType = .telephoneNumber
phoneField.keyboardType = .numbersAndPunctuation
Also make sure that Predictive in Keyboards Setting of device is turned on. If it doesn't work at once turn it off wait for a few seconds and then turn on again and boom it would be working again.
Hope it helps!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…