I’ve been working on a custom keyboard extension and encountering an issue where I can’t input text into the Custom TextField. Even when the TextField is selected (indicator is on), the input still goes to the app’s TextField instead. I’m using KeyboardKit (the feature I’m trying to implement is a paid option in KeyboardKit iOS). How can I solve this issue?
MyCustomToolbar(
searchText: Binding(
get: { self.searchText },
set: { self.searchText = $0 }
),
showSystemKeyboard: self.showSystemKeyboard,
toggleKeyboard: {
self.showSystemKeyboard.toggle()
},
onFocusChange: { isFocused in
self.isSearchFieldFocused = isFocused
}
)
override func textDidChange(_ textInput: UITextInput?) {
if isSearchFieldFocused {
if let text = textDocumentProxy.documentContextAfterInput {
searchText = text
}
} else {
super.textDidChange(textInput)
}
}
Some important snippets to understand the issue or I can share the complete file if you can help.