The outline item of outlineItem(for:) seems to be wrong

Number:rdar://37203575 Date Originated:2018-02-04 06:10:49 +0000
Status:Open Resolved:
Product:PDFKit Product Version:
Classification: Reproducible:Always

The outline item of outlineItem(for:) seems to be wrong. 

Steps to Reproduce:
1. Prepare a PDFSelection, currentSelection for example.
2. Get the PDFOutline object for currentSelection.
3. Print label for that outline. 

Example code: 
guard let selection = pdfView.currentSelection else { return } 
guard let outline = pdfView.document?.outlineItem(for: selection) else { return }

Expected Results:
outline.label returns the label of the outline for selection. 

Actual Results:
outline.label returns the label of last outline. 

Tested on Xcode 9.2 (9C40b) and Xcode 9.3 beta (9Q98q).
Bug occurs on iOS 11.2 or later.


Apple, Jun 6, 2019 at 12:34 AM

We believe this issue is resolved.

Please test this issue with the latest iOS 13 beta release and update your bug report at with your results.

iOS betas:

If the issue continues, please update any logs:

Has this issue been fixed for you?

By tongzhang101x at Sept. 29, 2019, 3:58 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!