So I experience crash in UItextview while user interacts with URL link there. All crash reports have iOS version 11 only. This looks like well-known bug in iOS 9, but there
I experienced and solved this problem.
This is workaround in my production code. Disable interaction .preview
state because of crashes only this state occurs.
func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
switch interaction {
case .presentActions, .invokeDefaultAction:
return handleLinkURL(url: URL)
case .preview:
return false
}
}