NSTextCheckingClient example code?

I am trying to implement text checking in my custom text editor by implementing NSTextCheckingClient, but I can't get anything to work. And I can't find much documentation or any example code anywhere.

I have created an example project here:

https://github.com/jessegrosjean/NSTextInputClient

I've made progress on getting NSTextCheckingClient to work. Still not sure that my Implementation is right, but at least some things work. Would be great to get some expert eyes on this code so there will be a good Swift implementation of NSTextInputClient and NSTextCheckingClient for developers to find.

NSTextCheckingClient example code?
 
 
Q