You can get a list of the keyboards installed on the iOS device using:
NSUserDefaults *userDeafaults = [NSUserDefaults standardUserDefaults];
NSDictionary *
@Leo Natan's answers is cool but it's may return nil when the keyboard have not display.
So here I use the string to find the UIKeyboardInputMode's property.
I can tell you that this can find out the current keyboard because it's comes from Apple's Private API.
Code here:
+ (BOOL)isTheCustomKeyboard
{
UITextInputMode* inputMode = [UITextInputMode currentInputMode];
if ([inputMode respondsToSelector:NSSelectorFromString(@"identifier")])
{
NSString* indentifier = [inputMode performSelector:NSSelectorFromString(@"identifier")];
if ([indentifier isEqualToString: YOUR_APP_ID])
{
return YES;
}
}
return NO;
}
And more:
+ (BOOL)isContaintCustomKeyboard
{
NSArray * inputModes = [UITextInputMode activeInputModes];
for (id inputModel in inputModes)
{
if ([inputModel respondsToSelector:NSSelectorFromString(@"identifier")])
{
NSString* indentifier = [inputModel performSelector:NSSelectorFromString(@"identifier")];
if ([indentifier isEqualToString: YOUR_APP_ID])
{
return YES;
}
}
}
return NO;
}
Actually we can also use the displayName or the identifier and more.