How to disable emoji keyboard on iOS 13?

Viewed 4566

I have an issue with disabling the emoji keyboard on iOS 13. before iOS 13 I could easily hide the emoji keyboard by textField.keyboardType = .asciiCapable Of course I still can do the same on iOS 13, it will remove the emoji keyboard option from the keyboard selection list:

enter image description here

but with the same setup, the emoji button will be available on the keyboard itself:

enter image description here

The problem is that it happens if only the user has 4 or more keyboards at the same time. And it only happens on iOS 13 and up, using iPhone X and up, not before that. So to wrap up: the emoji keyboard will always be hidden from the list of keyboards by using textField.keyboardType = .asciiCapable but won't be hidden on the keyboard itself if the user has 4 keyboards (in this case: English, Danish, Swedish and Emoji). and of course it's a problem only on iPhone x and up because of the new design. Does anyone know how I can completely disable or remove the emoji option on keyboard?

P.S. I'm testing on iOS 13.3 and 12.4, iPhone X and up, using Xcode 11.3.1

2 Answers
txtField.keyboardType=UIKeyboardTypeASCIICapable;

Here is the solution I have found from Swift Arcade yt channel.

yourTextField.keyboardType = .asciiCapable
Related