I got the bug on iOS16 like below.
I'm using this below code to check character position.
let end = caption.characterRange(at: CGPoint(x: frame.maxX, y: frame.maxY))?.end
I got the print log using the above code on iOS15.5.
Optional(<_UITextKitTextPosition: 0x60000216e1e0> (153B))
But when I run on the iOS16.0 simulator, I got this print log.
Optional(<_UITextKitTextPosition: 0x6000038a9240> (573F))
Is it os bug? Do you have any information about iOS16?