Search code examples
iosobjective-ctextview3dtouch

Bug 3DTouch Keyboard Text Selection [_NSActivityAssertion setCursorPosition:]: unrecognized selector sent to instance


I'm using Hakawai framework (a mention framework in a UITextView) but when use iOS Keyboard with a device with 3D Touch and select text with 3DTouch option in keyboard, the application crashes :

[_NSActivityAssertion setCursorPosition:]: unrecognized selector sent to instance occurs to

[NSString setCursorPosition:]: unrecognized selector sent to instance


Solution

  • The error was when the textView runs resignFirstResponder and becomeFirstResponder to change Spell Checking while Keyboard 3D Touch Selector is working, then the selector try to call the next focused object (while is in becomeFirstResponder)