Xamarin


Developers can use Xamarin to write native iOS and Android apps with a shared C# codebase. We provide separate bindings for iOS and Android, as they are different SDKs and have an API that closely matches the underlying system.

PSPDFKit for iOS

PSPDFKit for iOS includes full-featured bindings for Xamarin (formerly called MonoTouch). We closely work with Xamarin to provide up-to-date bindings shortly after the regular PSPDFKit releases. These bindings allow extensive customization and subclassing.

You can try the demo by requesting a demo from our website and then adding the PSPDFKit binary to the Xamarin binding.

Xamarin Forms users can show the PSPDFViewController in full-screen.

Building PSPDFKit.iOS.dll

Note: You must have at least Xamarin.iOS 9.8 and OS X 10.11.x to compile this binding project, also your project minimum version must be 8 or later.

In order to use the bindings please follow these instructions:

Step 1 - Get the bindings

  1. Clone the PSPDFKit/Xamarin-iOS repository from GitHub.
  2. Switch into the Xamarin-iOS directory.

Step 2 - Get PSPDFKit.framework

  1. Download PSPDFKit from your customer portal if you haven't done so already.
  2. Open the dmg file you downloaded in step 1 and copy PSPDFKit.framework to the PSPDFKit.iOS folder.

This binding provides Unified Api support out of the box.

Step 3 - Get your Dll

You have two options to get it:

Build from PSPDFKit.iOS.sln

  1. Open PSPDFKit.iOS.sln on Xamarin Studio or Visual Studio.
  2. Build the project.
  3. Get the dll from the bin folder.
  4. Add a reference of PSPDFKit.iOS.dll to your project.
  5. Add the namespace using PSPDFKit.iOS;
  6. Enjoy

Build from terminal

  1. Just run make command from root or Xamarin.iOS directory
  2. Get the dll from the Dll folder
  3. Add a reference of PSPDFKit.iOS.dll to your project.
  4. Add the namespace using PSPDFKit.iOS;
  5. Enjoy

Set the License Key

Call PSPDFKitGlobal.SetLicenseKey("YOUR_LICENSE_KEY_GOES_HERE"); early on in your AppDelegate, before accessing any other PSPDFKit classes.

Stylus Support

PSPDFKit for iOS includes support for all major stylus vendors, including the Apple Pencil (as of 5.1).
How to integrate the stylus drivers into your Xamarin app is explained here.

Was this page helpful? We're happy to answer any questions.