Hello. I am developing an app that helps people with language issues communicate and for that I thought I could do a custom keyboard for them.
I was wondering if there is a way of doing a 3rd party keyboard using SwiftUI (little to no UIKit) and if so, where can I find documentation/tutorials.
I have looked with no success.
Additionally, can we use a PKCanvasView inside of keyboards (ie, is there any restriction/policy)? I intend to use it so that users can draw the words they're looking for (I already have the model and know how to come up with the suggestions and everything)
Thanks a lot!
Post
Replies
Boosts
Views
Activity
Does iOS provide an API for getting text predictions based on previous text?
I tried with UITextChecker.completions as such
let str = "Hello"
let range = NSMakeRange(str.utf16.count, 0)
let tc = UITextChecker()
let completions = tc.completions(forPartialWordRange: range, in: str, language: "en-US")
print(completions)
However, this only works for completing words, not sentences. Does iOS have a way of doing this? I read somewhere that macOS does. If not, what workarounds/alternatives would you recommend?