We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 293d21b commit ecbfe9dCopy full SHA for ecbfe9d
Sources/FlickTypeKit/FlickTypeKit.swift
@@ -88,8 +88,9 @@ public extension WKInterfaceController {
88
internal func presentSystemInputController(_ invocation: TextInputInvocation) {
89
90
let flickTypeText = "⌨︎\tFlickType\n\tKeyboard"
91
- func completionWrapper(textInputControllerReturnedItems: [Any]?) {
92
- if let inputText = textInputControllerReturnedItems?.first as? String {
+ // Ensure we only hold a weak reference to self here
+ let completionWrapper: ([Any]?) -> Void = { [weak self] textInputControllerReturnedItems in
93
+ if let self, let inputText = textInputControllerReturnedItems?.first as? String {
94
if inputText == flickTypeText {
95
return presentFlickTypeOrIntermediateController(invocation)
96
}
0 commit comments