Hello,
I've been integrating the library to some of our projects, and I found the following issue:
on iOS 10 it works fine; however, I had complaints that it does not work on iOS 9.1 and I checked it on the iPad simulator iOS 9.1.
In my code, I do the following: (not important parts are cut out, I need to fill some annotations and just save the doc)
PDFDoc *doc = [[PDFDoc alloc] init];
[doc open:_pdfPath :@""];
int pages = [doc pageCount];
for(int index = 0; index < pages; index++){
PDFPage *page = [doc page:index];
[page objsStart];
int annots = [page annotCount];
for(int annot = 0; annot < annots; annot++){
// [annotation setEditText:string];
// do some stuff - prepopulate annots with text
}
}
[doc save]
After that I open the document again in viewer and let user view it. (But app does not get to that point)
After the method ends, the document gets released and app hangs: see code below.
Pausing the app shows that it hangs in the dealloc method of PDFPage class:
-(void)dealloc
{
PDF_PAGE tmp_page = m_page;
m_page = NULL;
Page_close(tmp_page); // here it hangs
}
If use the library as always, to view, it works just fine (pages deallocate fine as well); on iOS 10 works just fine as well.
If i can help you more, please let me know.
Thanks.