title: pdfOutline of PDFKit in Objective-C
body: <p>i try badly to extend (im a beginner with Objective-C) a pdf-viewer with PDF-included Outlines. The viewer is based on Apples PDFKit. (<a href="https://developer.apple.com/documentation/pdfkit/pdfoutline" rel="nofollow noreferrer">https://developer.apple.com/documentation/pdfkit/pdfoutline</a>)</p>
  
  <p>Thats what i have done so far:</p>
  
  <pre><code>    PDFPage *page = [_pdfDocument pageAtIndex:_pdfDocument.pageCount-1];
      PDFOutline *pdfOutline = [_pdfDocument outlineRoot];
  
      NSLog(@"LOG of pdfOutline");
      NSLog(@"%@", pdfOutline);
      NSLog(@"%i", pdfOutline.numberOfChildren);
  </code></pre>
  
  <p>Thats gives me the following Output:</p>
  
  <pre><code>[3685:9776989] LOG of pdfOutline
  [3685:9776989] &lt;PDFOutline: 0x60c000203370&gt;
  [3685:9776989] 4
  </code></pre>
  
  <p>So far so good, but I need somehow the labels and the page numbers in an jsonObject (its necessary cause of using it later in a react-native callback). Im even not sure what the output  of "pdfOutline" is.</p>
  
  <p>I really have no idea how to start. The goal is clear, generate an json-object from the outlines.</p>