I've added phone numbers highlight to my UITextView.
self.textView.dataDetectorTypes = UIDataDetectorTypeAll;
If I just:
Everything is good. But if I cancel adding and try to exit from this menu, app will crash.
So... App crash if i cancel contact adding in standart control. And it crashes in private method (-[UITextView _finishHandlingInteraction:] UITextView_LinkInteraction.m:335).
I've tried to find some info about those method, or some info about same crash. But it didn't help =(
iOS 8.4
Crash log:
Assertion failure in -[MYCustomTextView _finishHandlingInteraction:], /SourceCache/UIKit/UIKit-3347.44/UITextView_LinkInteraction.m:335
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '' * First throw call stack: (0x2ad85fef 0x39171c8b 0x2ad85ec5 0x2ba84f17 0x2eab9a4b 0x2e76f2b7 0x2e76f793 0x2e76f735 0x2e76f52d 0x2eac4115 0x2e55806b 0x2e4070f9 0x2e820f9b 0x2e3d0181 0x2e3ce05f 0x2e4054d9 0x2e404ddd 0x2e3dafe5 0x198f2f 0x2e6518fb 0x2e3d99f9 0x2ad4bfaf 0x2ad4b3bf 0x2ad49a25 0x2ac96201 0x2ac96013 0x32472201 0x2e43aa59 0x1afa6b 0x396fdaaf) libc++abi.dylib: terminating with uncaught exception of type NSException
For iOS 9(13A4293g) betta:
*** Assertion failure in -[MYCustomTextView _finishHandlingInteraction:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3486.4/UITextView_LinkInteraction.m:342
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '' * First throw call stack: (0x24d69153 0x3659ee0f 0x24d69029 0x25b4862d 0x297c1867 0x297c2397 0x29362041 0x2936267b 0x293625e3 0x29362315 0x297cf597 0x29408299 0x29454123 0x290dff13 0x28f77189 0x294538f3 0x28f39ecb 0x28f37ab1 0x28f75201 0x28f7494b 0x28f469b5 0x1679e3 0x28f4533d 0x24d2c81b 0x24d2c409 0x24d2a74b 0x24c7d229 0x24c7d015 0x2dd25bb9 0x28faca7d 0x17e523 0x36d07873) libc++abi.dylib: terminating with uncaught exception of type NSException
It was a problem in iOS core. I had wrote to apple support. And they proposed me to test it on iOS 9 beta 4. Now it don't crash. But post a lot of strange messages to logs. Any way now it is not a theme for discuss. It is work for guys in Apple. So thats why.