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

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

Summary:
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 }
print(outline.label)

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

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

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

Comments

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 https://bugreport.apple.com/ with your results.

iOS betas: https://developer.apple.com/download/

If the issue continues, please update any logs: https://developer.apple.com/bug-reporting/profiles-and-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 bugreport.apple.com 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!