vandadnp/iOS-8-Swift-Programming-Cookbook

Custom keyboard code issue

ugol opened this issue · 3 comments

ugol commented

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 commented

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

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