iOS-8-Swift-Programming-Cookbook icon indicating copy to clipboard operation
iOS-8-Swift-Programming-Cookbook copied to clipboard

Custom keyboard code issue

Open ugol opened this issue 11 years ago • 3 comments
trafficstars

The keyboard shows correctly, but when you tap everywhere you got a:

Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo=0x17027c540 {Message=Service Connection Interrupted}

Note that I also had to slightly modify the handleTapOnButton func to compile the code on Xcode 6 GA:

func handleTapOnButton(button: UIButton){
     let buttonText = button.titleForState(.Normal)
     if let proxy = textDocumentProxy{
-      proxy.insertText(buttonText)
+      proxy.insertText(buttonText!)
     }
   }

ugol avatar Sep 19 '14 20:09 ugol

Additionally, I have no idea on how to debug it, the standard techniques don't work on the custom keyboard code (NSLog neither)

ugol avatar Sep 19 '14 21:09 ugol

How to debug a custom keyboard: https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html#//apple_ref/doc/uid/TP40014214-CH16-SW6

ugol avatar Sep 20 '14 08:09 ugol

Please try this on Xcode 6.1 Beta 2, Apple seems to have fixed this issue.

Please also git fetch the latest code to get the latest code for the handleTapOnButton: method

vandadnp avatar Oct 18 '14 14:10 vandadnp