diff --git a/modules/expo-selectable-text/ios/ExpoSelectableTextView.swift b/modules/expo-selectable-text/ios/ExpoSelectableTextView.swift index 681ad5b53f..cc7b17dc10 100644 --- a/modules/expo-selectable-text/ios/ExpoSelectableTextView.swift +++ b/modules/expo-selectable-text/ios/ExpoSelectableTextView.swift @@ -130,10 +130,7 @@ class ExpoSelectableTextView: ExpoView { let range = text.range(of: segment.text) // Figure out the bounds if let lowerBound = range?.lowerBound, let upperBound = range?.upperBound { - let lowerIndex = text.distance(from: text.startIndex , to: lowerBound) - let upperIndex = text.distance(from: text.startIndex, to: upperBound) - - if charIndex >= lowerIndex, charIndex <= upperIndex { + if charIndex >= lowerBound.utf16Offset(in: text), charIndex <= upperBound.utf16Offset(in: text) { foundSegment = segment } }