Developers can use Xamarin to write native iOS, Android, and macOS 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 MacOS
PSPDFKit for iOS includes full-featured bindings for Xamarin/Visual Studio. We work closely 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 first requesting a demo from our website and then adding the PSPDFKit binary to the Xamarin binding.
In order to build this binding project, you need the following:
- Visual Studio for Mac
- Xamarin.Mac 4.0 +
Step 1: Get the Bindings
- Clone the
PSPDFKit/Xamarin-iOSrepository from GitHub.
- Open the
Step 2: Copy the Required Files
- Download PSPDFKit for Mac from your customer portal if you haven’t done so already.
- Alternatively, request a trial version if you’re not yet a customer.
- Open the dmg file you downloaded in step 1 and copy
Step 3: Get the DLL
You have two options to get the DLL.
Using Visual Studio for Mac
PSPDFKit.sln, which is located in the root folder.
- Build the
macOSproject inside the solution.
- Get the DLL from the
Using the Command Line / Terminal
We use Cake as our build system.
- Run the
./build.sh --target mac(Mac) command from the
- The resulting DLL will be inside the root folder.
Step 4: Integrating into Your Project
- Add a reference of
PSPDFKit.Mac.dllto your project.
- Add the following namespace to your project:
Set the License Key
PSPDFKitGlobal.SetLicenseKey("YOUR_LICENSE_KEY_GOES_HERE"); early on in your AppDelegate before accessing any other PSPDFKit classes.
If you need a little more information, you can take a look at our
MacPDFViewer example project.