Creating Tools package from PDFViewCtrlTools Objective-C source code

This article only applies to Xamarin.iOS.
Why do I want to build Tools package from source?
PDFViewCtrlTools project for iOS is an open source Objective-C project. Although a number of UI controls and tools are provided out-of-the-box, there may be behaviour that you would want to change to best suit your own project. The best way to do so will be diving into the source code.

Before you get started, it is a good idea to first have some basic knowledge on the topic. Xamarin provides a comprehensive guide on Binding Objective-C and we recommend you to briefly go through it. Please note that you will not need to create a binding project as it is already provided in the package.

PDFTron iOS SDK for Xamarin is a completely open source binding project. By the end of this tutorial, you will be able to create PDFTron.iOS.Tools from source.

Latest Visual Studio for Mac is required to proceed.
  1. Download the PDFTron for Xamarin.iOS SDK package, refer to as PDFNetXamarin.iOS package below
  2. Download the PDFTron for iOS SDK package, refer to as PDFNetiOS package below
  3. In PDFNetiOS package, update the /Lib/Tools/src/PDFViewCtrlTools project in Xcode as you wish
  4. Once you are done with changing the source code in Objective-C, create Tools.framework by clean build from Xcode, the output can be found in /PDFViewCtrlTools/build/Release-Universal folder, make sure your build configuration in Xcode looks like the following:

  1. Copy Tools.framework from previous step to PDFNetXamarin.iOS/lib/ios/Native folder
  2. Copy PDFNet.framework from PDFNetiOS/Framework-dynamic to PDFNetXamarin.iOS/lib/ios/Native folder, your PDFNetXamarin.iOS/lib/ios/Native folder should now look like this:

  1. From PDFNetXamarin.iOS package, open /projectSrc/PDFNetiOSXamarin/PDFNetiOSXamarin.sln in Visual Studio for Mac
  2. Clean the project
  3. Build PDFViewCtrlTools project
  4. You can find the output PDFTron.iOS.Tools.nupkg in PDFNetXamarin.iOS/lib/ios folder