Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you disable a 3rd party keyboard in your iOS app

Can you disable 3rd party keyboards in iOS?

If so, how?

like image 390
Snowcrash Avatar asked Jan 23 '15 11:01

Snowcrash


People also ask

Does iOS support 3rd party keyboard?

Third-party iOS keyboard apps for the iPhone and iPad are downloaded from the iOS App Store. The keyboards may come bundled in a larger app or may be dedicated to the keyboard. Once an app is downloaded, you'll need to enable the keyboard.


2 Answers

Add this method to your UIApplicationDelegate

-(BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(NSString *)extensionPointIdentifier
    {

        if (extensionPointIdentifier == UIApplicationKeyboardExtensionPointIdentifier)
        {
            return NO;
        }

        return YES;
    }
like image 196
Denis Krivitski Avatar answered Oct 23 '22 08:10

Denis Krivitski


Swift 5.1

Add to AppDelegate.Swift:

func application(application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: String) -> Bool {
    if (extensionPointIdentifier == UIApplication.ExtensionPointIdentifier.keyboard.rawValue) {
        return false
    }

    return true
}
like image 43
DisplayName Avatar answered Oct 23 '22 08:10

DisplayName