In custom iOS keyboard detect the app

0 votes
How to detect in which app my custom keyboard used and show different button? E.g. in Twitter I would add @ to string I post into input field and in Reddit /r/
Nov 17, 2022 in Mobile Development by gaurav
• 23,260 points
418 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Here is a method I have used in one of my projects. I think it is what you asked for, hope it helps you.

- (BOOL)isCustomKeyboardEnabled {
    NSString *bundleID = @"com.company.app.customkeyboard"; // Replace this string with your custom keyboard's bundle ID
    NSArray *keyboards = [[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] objectForKey:@"AppleKeyboards"]; // Array of all active keyboards
    for (NSString *keyboard in keyboards) {
        if ([keyboard isEqualToString:bundleID])
            return YES;
    }

    return NO;
}
answered Nov 18, 2022 by gaurav
• 23,260 points

edited Mar 5

Related Questions In Mobile Development

0 votes
0 answers

Can I install the "app store" in an IOS simulator?

The IOS simulator in my computer doesn't ...READ MORE

Nov 23, 2022 in Mobile Development by gaurav
• 23,260 points
1,790 views
0 votes
0 answers

Can I install the "app store" in an IOS simulator?

The IOS simulator in my computer doesn't ...READ MORE

Nov 30, 2022 in Mobile Development by gaurav
• 23,260 points
497 views
0 votes
0 answers
0 votes
0 answers

iOS15 How can I test the App Icon in Xcode 13?

In the session Get ready to optimize your ...READ MORE

Nov 10, 2022 in Mobile Development by gaurav
• 23,260 points
578 views
0 votes
0 answers

How to fetch the width and height of a programatically added view in Swift/ iOS?

I have added a UIView and a ...READ MORE

Nov 10, 2022 in Mobile Development by gaurav
• 23,260 points
1,248 views
0 votes
0 answers

What is the equivalent of apk in iOS?

What is the equivalent of apk in ...READ MORE

Nov 15, 2022 in Mobile Development by gaurav
• 23,260 points
497 views
0 votes
0 answers

How to create Multiple Themes/Skins for iphone apps?

I already have an iPhone app that ...READ MORE

Sep 28, 2022 in IOS by Soham
• 9,710 points
817 views
0 votes
1 answer

Getting country calling prefix

For a class that offers both this ...READ MORE

answered Sep 20, 2022 in Others by Aditya
• 7,680 points
948 views
0 votes
1 answer

white screen on simulator iphone Xcode

After creating the request, you must actually ...READ MORE

answered Sep 20, 2022 in Others by Aditya
• 7,680 points
4,121 views
0 votes
1 answer

Is there a way to to check if a picture was taken on that iPhone?

Actually, the model and manufacturer information is ...READ MORE

answered Sep 22, 2022 in IOS by Rahul
• 9,680 points
769 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP