Questions tagged [ios-keyboard-extension]

Custom keyboards are App Extensions that can run system-wide in iOS 8 and up.

A custom keyboard replaces the system keyboard for users who want capabilities such as a novel text input method or the ability to enter text in a language not otherwise supported in iOS. The essential function of a custom keyboard is simple: Respond to taps, gestures, or other input events and provide text, in the form of an unattributed NSString object, at the text insertion point of the current text input object.

Before iOS 8, developers are able to provide custom keyboards with custom keys within their application only. With iOS 8, Apple has made it possible to create custom keyboards that will be able to be used system wide in other apps. Now it is possible to ship a custom keyboard with iOS app and users will be able to choose it as the keyboard to use for every app that requires text input.

Source

Apple App Extension Programming Guide: Custom Keyboard

177 questions
42
votes
1 answer

How does Google's custom iOS keyboard, Gboard, programmatically dismiss the frontmost app?

Google's custom iOS app, Gboard, has an interesting feature that can't be accomplished using public APIs for in the iOS SDK (as of iOS 10). I'd like to know exactly how Google accomplishes the task of programmatically popping back one app in the…
prairiedogg
  • 6,163
  • 8
  • 40
  • 52
34
votes
2 answers

How to check "Allow Full Access" is granted since iOS 8.3 *from the container app*

Prior to iOS 8.3, the way to check whether "Allow Full Access" was granted to a keyboard extension was through the following code in the container app: - (BOOL)isOpenAccessGranted{ return [UIPasteboard generalPasteboard]; } However, as comments…
daspianist
  • 4,972
  • 8
  • 46
  • 87
17
votes
2 answers

Implement Keyboard Key Pop Animation in iOS 8 Keyboard Extension

I'd like to ask how to implement the pop animation when holding a keyboard key for iOS 8 keyboards extension. I know how to assign the long press gesture on every key but doesn't know how to animate the keys to present other characters in that…
jaytrixz
  • 3,957
  • 7
  • 35
  • 57
15
votes
4 answers

Prevent custom keyboard in textfield

I was experimenting with how a custom keyboard affects my app. I installed Swype on my iPhone 6. I find that in some of my views where I have custom inputView property set on a text field, the Swype keyboard is overriding and presenting instead of…
Dean Davids
  • 4,154
  • 2
  • 27
  • 44
12
votes
1 answer

Write into a database stored in App Group container from extension

I have a sqlite database stored in the App Group container in order to register custom shortcut. I can read/write into it from the app, but not from the keyboard extension. It seems that the database is in read-only mode from extensions. I'm using…
Matthew
  • 689
  • 6
  • 20
11
votes
1 answer

How to detect from iOS keyboard extension that a textfield is cleared via actions like hitting "Send" in iMessage?

In my iOS keyboard app, I currently have a text suggestions bar much like the default iOS 8 Keyboard's suggestion bar. I would like to clear all text on the suggestion bar whenever the user does something that clears the text field (for example,…
daspianist
  • 4,972
  • 8
  • 46
  • 87
10
votes
2 answers

How to Insert NSAttributedString using custom keyboard extension?

I want to write text in some custom fonts using keyboard Extension as these apps (1,2,3,4) are doing. I know how we can insert normal string in document proxy. [self.textDocumentProxy insertText:mystring]; I have tried to insert…
jamil
  • 2,409
  • 3
  • 34
  • 64
9
votes
3 answers

Open Keyboard's settings screen in iOS's settings app programmatically from another app

How can we go directly to any of the below mentioned screens of iOS's settings app programmatically
iHulk
  • 4,683
  • 2
  • 27
  • 38
9
votes
2 answers

How to test if "Allow Full Access" permission is granted from containing app?

I'm working on a keyboard extension project. At some points of the application code I need to test if the user have granted the "Allow Full Access" permission for the keyboard extension. The deal is that I need to do those tests from the application…
Emil Adz
  • 38,699
  • 35
  • 127
  • 177
9
votes
1 answer

Can we detect which ios application is using my Custom keyboard

I want to detect in my custom keyboard extension app which application is using my extension. Can we detect any information in keyboard extension about application which is using my extension.I dont think it is possible .if any body have have…
Abeer Iqbal
  • 779
  • 5
  • 8
8
votes
10 answers

How to hide Toolbar in IQKeyboardManager iOS Swift 3

I'm using the IQKeyboardManger library to scroll text fields when started typing using the keyboard, but I don't want to display the default toolbar from their library. Below is the code I've used. override func viewDidLoad() { …
Gijo Varghese
  • 8,506
  • 17
  • 61
  • 104
8
votes
1 answer

resignFirstResponder() in Third-Party Keyboards

I have a third party keyboard that currently contains a UISearchBar(that is first responder on start) and the user is able to search for content (i.e. gifs) to be able to copy, paste, send to friends, etc. In theory, after entering text in the bar…
cyril
  • 2,644
  • 3
  • 29
  • 57
8
votes
1 answer

Unable to Localize Custom Keyboard iOS

I am trying to implement a keyboard extension, which can display keys depending upon the language chosen by the user in Settings of the device. In Edit Scheme, I have correctly setup the Application Language and Application Region for both Container…
NightFury
  • 12,692
  • 6
  • 65
  • 112
8
votes
1 answer

How to handle UITextField inside a keyboard app extension

I have added textfield (keyboardTextField) and UISwitch on top of my custom keyboard. I can set focus ON or OFF for (keyboardTextField) on the base of Switch value my code. - (void)switchToggled:(id)sender { UISwitch *mySwitch =…
7
votes
0 answers

How to use needsInputModeSwitchKey properly?

When i try to use (anywhere and anytime in my code) needsInputModeSwitchKey property from UIInputViewController i'm facing with warning: -[UIInputViewController needsInputModeSwitchKey] was called before a connection was established to the host…
pacification
  • 5,140
  • 3
  • 22
  • 46
1
2 3
11 12