Kodeco Forums

Custom Keyboard Extensions: Getting Started

Custom keyboard extensions give you the ability to provide keyboards to apps outside of your own. In this tutorial, you'll walk through creating a custom keyboard extension with advanced features like autocomplete.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/49-custom-keyboard-extensions-getting-started

Hi Mr. Eric Cerney, Thanks For this great tutorial. I want to make a custom keyboard, and This helped me a lot.
Still I want to know some more things regarding that. Here I mention those. If Possible, Share your next tutorial on them or Help me with any resources or Documentation.

  1. Moving Focus from & to between KeyboardViewController and App’s screens.
  2. Handling Return Key.
    I am doing this by writing a function which returns title, in UIReturnKeyType enum. Is that RightWay?
  3. Deleting on long press of back button.
  4. I am using buttons as keyboard keys, in my project. Would you please suggest me what to use for best results.

So far, These all I want to know. Please Help me in that, or if there is any book explaining these concepts, I will go for that as well.

Again Thanks a lot for your awesome tutorial on Custom Keyboard.

regards,
Leela Prasad

@ecerney Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hey Leela,

Glad you enjoyed the tutorial. I’ll attempt to answers your questions here:

  1. I’m not sure what you mean here? When the app screens have a text entry, like UITextField or UITextView, and the user selects them to make them first responder, the keyboard is brought up automatically. To disable the keyboard to bring you back to screen itself, you could call yourTextField.resignFirstResponder()
  2. That should be fine… This allows you to customize the return key (like making it all caps for example) while still showing the text that the developer intended when they set the keyboard type on their text entry. You could switch over all the return types and do something slightly different if you wanted to.
  3. Generally when you want a long press to retrigger the action, you would use something like a timer to keep triggering the action while the long press is still happening. An example: ios - Press-and-hold button for "repeat fire" - Stack Overflow
  4. Buttons work perfectly fine. They come with a lot of things automatically for you, like highlighting on tap for example.

Hope that helps!
-Eric

Hi do you know if custom keyboard could send audio in messenger? Like how Giphy can send gif by copy and paste?

@ecerney Can you please help with this when you get a chance? Thank you - much appreciated! :]

1 Like

Hey @joetan. I’ve not tried that, but I’m sure it’s possible through a combination of the custom keyboard + an iMessage extension. You would most likely need to use an iMessage extension to have it work within iMessages. Check out https://www.raywenderlich.com/4339-imessage-apps.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!