[iOS] PDFNet for iOS 5 and ARC (automatic reference counting)

Q: I’m just starting out evaluating PDFNet for iOS (http://www.pdftron.com/pdfnet/mobile/ios_pdf_library.html). The first issue that I have come up against is that my (iOS 5) application implements ARC (automatic reference counting) and the ColorPicker library does not. I can go through and attempt to convert it to use ARC – however it would be easier if there was a version available that already will work with ARC. Is this available? Also am I likely to run into any other issues with implementing PDFNet with regards to ARC?

A: libPDFNet.a is compatible with ARC. It should not be necessary to convert the color picker to ARC because you can instruct XCode not to use ARC for the color picker source files (see this link for how: http://stackoverflow.com/questions/6308425/ios-5-best-practice-release-retain). Where there is a bit of trouble is setting up the “Tools” code (that implements text selection and annotation manipulation) for use with ARC. In the sample project, the class “PanTool” is instantiated when it is only declared via a forward declaration, which does not appear to be compatible with ARC. We will need to do some investigation into how to enable this. (Customers are provided with the source code for libPDFViewCtrlTools.a, so this wouldn’t be a problem in that case.)

In the mean time, the viewer itself will work in an ARC project, and you can evaluate the annotation and text selection capabilities by compiling the included sample.