PDFKit's characterIndex(at:) Method Innacurate on iOS 17 (REGRESSION)

PDFKit’s characterIndex(at:) method consistently returns the incorrect character index on iOS 17. It seems to get worse the further down the page you get. This breaks critical functionality that my app relies on. Prior to iOS 17, it would be wrong sometimes but not as consistently.

This is the method in question: https://developer.apple.com/documentation/pdfkit/pdfpage/1503775-characterindex

I've filed feedback FB12951475 with a sample project attached.

Run into a PDFKit problem in iOS 17 beta that is most likely related:

PDFPage.characterBounds(at: Int) -> CGRect

is returning incorrect coordinates with iOS 17 beta 5 / Xcode 15 beta 6. Worked fine iOS 16 and earlier.

Same for me, it breaks critical functionality that my app relies on.

I have filed feedback (FB12918701).

Any update on this? I'm finding strange results for PDFView.convert(NSPoint, to: PDFPage). Might be related

Hi, are you having this problem again with iOS 18 betas? I am having troubles again with the PDFPage.characterBounds(at: Int) -> CGRect function. Same as last year in the iOS 17 beta cycle. Filed feedback (FB14843671) but so far no changes in the latest betas.

PDFKit's characterIndex(at:) Method Innacurate on iOS 17 (REGRESSION)
 
 
Q