Creating Keyboard Extensions

Creating Keyboard Extensions

This is the talk I gave at the May 2018 Tokyo iOS Meetup

06aad43b39f220d9e92cef95745e706d?s=128

John Estropia

May 12, 2018
Tweet

Transcript

  1. 2.

    TOKYO IOS MEETUP @JOHNESTROPIA Developer since 2008 (mostly Mobile apps)

    Principal Engineer @ Other hobby projects http://github.com/JohnEstropia/CoreStore
  2. 9.

    TOKYO IOS MEETUP PITFALL #1 ▸ There is no perfect

    way to access the UITextInput’s instance But this is a good thing security-wise
  3. 10.

    TOKYO IOS MEETUP PITFALL #1 ▸ There is no perfect

    way to access the UITextInput’s complete text or its length ▸ But there is a workaround that works “most of the time”
  4. 14.

    TOKYO IOS MEETUP ABC DEF So to get the complete

    text we just append these two together. Right? Right??
  5. 18.

    TOKYO IOS MEETUP PITFALL #1 ▸ There is no perfect

    way to access the UITextInput’s complete text or its length ▸ Some characters such as (?) and (!) have special treatment! (bug?)
  6. 22.

    TOKYO IOS MEETUP PITFALL #2 ▸ Keyboard “Full Access” is

    unfortunately needed even for minor functions ▸ Play clicking sounds ▸ Read from or write to a shared NSUserDefaults ▸ Accessing the clipboard
  7. 23.

    TOKYO IOS MEETUP PITFALL #2 ▸ Keyboard “Full Access” is

    unfortunately needed even for minor functions Info.plist
  8. 24.

    TOKYO IOS MEETUP PITFALL #2 ▸ Keyboard “Full Access” is

    unfortunately needed even for minor functions
  9. 25.

    TOKYO IOS MEETUP PITFALL #3 ▸ Apps can reject custom

    keyboards (e.g. for security) UIApplicationDelegate
  10. 26.

    TOKYO IOS MEETUP PITFALL #4 ▸ Memory allotted to Keyboard

    extensions is severely limited (~30MB) ▸ Avoid using too many nib files / image resources
  11. 27.
  12. 28.

    TOKYO IOS MEETUP TIP #1 ▸ Debugging a Keyboard in

    a specific locale will run any app in that locale ▸ No need to change the device language!
  13. 30.

    TOKYO IOS MEETUP TIP #2 ▸ You are not restricted

    to a single character per input
  14. 31.

    TOKYO IOS MEETUP TIP #3 ▸ The Globe button logic

    can be simulated in a single line!
  15. 32.

    TOKYO IOS MEETUP TIP #3 ▸ The Globe button logic

    can be simulated in a single line!
  16. 33.

    TOKYO IOS MEETUP TIP #4 ▸ You can check the

    "Allow full access" status by twiddling with the clipboard
  17. 36.
  18. 37.

    TOKYO IOS MEETUP WHAT I'VE LEARNED ▸ There's a ton

    of untapped use-cases in third-party apps that can be improved with custom keyboards ▸ Think of them as plugins