Hikarus Hikarus - 2 months ago 18
Swift Question

How does one disable third party keyboards in Swift?

Basically that's it, I haven't found a way to disable third party keyboard in my app, although I know it's possible 'cos I've seen it in apps like 1Password.

Any ideas?

Answer

Add this code in your AppDelegate

func application(application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: String) -> Bool {
    if extensionPointIdentifier == UIApplicationKeyboardExtensionPointIdentifier {
        return false
    }
    return true
}