Giter VIP home page Giter VIP logo

xamarin-ios's Introduction

Xamarin PSPDFKit for iOS and Mac Bindings

  • Xamarin.iOS Bindings for PSPDFKit 9.2.0 for iOS
  • Xamarin.Mac Bindings for PSPDFKit 4.2.0 for macOS

PSPDFKit

The PSPDFKit SDK is a framework that allows you to view, annotate, sign, and fill PDF forms on iOS, Android, Windows, macOS, and Web.

PSPDFKit Instant adds real-time collaboration features to seamlessly share, edit, and annotate PDF documents.

Related

Minimum Requirements

In order to build this binding project you need:

  • Visual Studio for Mac or Windows
  • Xamarin.iOS 13.6 +
  • Xamarin.Mac 6.6 +

Build Instructions

Step 1 - Get the bindings

  1. Clone this repository to your computer.
  2. Open the Xamarin-iOS directory.

Step 2 - Copy required files

  1. In order to use this C# binding because Xamarin does not support xcframework yet, you will need to obtain the full PSPDFKit framework files using the COCOAPODS_KEY from your customer portal if you haven't done so already, or request an evaluation version.
  2. Replace COCOAPODS_KEY with your key and download the following two zip files.
  3. Extract the zip files you downloaded in step 2 and copy the following files into the specified directories:

iOS: From PSPDFKit-for-iOS zip.

Mac: From PSPDFKit-for-macOS dmg.

* Items with an asterisk are optional, if you do not provide a framework, by default we won't generate its bindings, but most of the time you will want to provide PSPDFKit.framework and PSPDFKitUI.framework at minimum.

Step 3 - Get your dlls

Using Visual Studio for Mac or Windows

  1. Open PSPDFKit.sln located in the root folder.
  2. Build the binding projects inside the iOS or Mac solution folders.
  3. Get the dlls from the bin folder of each project.
  4. Go to Step 4 - Integrating into your ptoject.

Using command line / terminal

We are using Cake as our build system, this allows us to build on both Windows and Mac from a single script.

  1. Run ./build.sh (Mac) / .\build.ps1 (Windows) command from the root directory.
  2. All the resulting dlls will be inside the root folder.
  3. Go to Step 4 - Integrating into your ptoject.

Advanced build

We use the Default build task which builds all binding projects as long as the frameworks are present inside each directory (see Step 2 - Copy required files), if an optional framework is not present this Task will just skip.

In the case you just want the Mac bits to be built you can do ./build.sh --target mac. Here are the most common tasks available in the build script, they are particularly useful when you are integrating this into a CI Server.

General Tasks
Task Description
Default Builds all PSPDFKit dlls.
ios Builds iOS PSPDFKit dlls.
mac Builds macOS PSPDFKit dlls.
Clean Cleans the build.

To list all available tasks you can do ./build.sh --showdescription.

Step 4 - Integrating into your project

Add the generated PSPDFKit dlls as a reference to into your own Xamarin project and add the corresponding using statements depending on the dlls referenced into your project.

using PSPDFKit.Model;
using PSPDFKit.UI;
using PSPDFKit.Instant;

Also you do need to set your license key early on in your AppDelegate, before accessing any other PSPDFKit classes.

public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
	PSPDFKitGlobal.SetLicenseKey ("YOUR_LICENSE_KEY_GOES_HERE");
	// ...
}

PSPDFKit Instant

Support for Instant was added with the Xamarin.iOS Bindings for PSPDFKit 7.2.0 for iOS.

With PSPDFKit Instant, it’s easier than ever to add real-time collaboration features to your PSPDFKit-powered app, allowing your users to seamlessly share, edit, and annotate PDF documents across iOS, Android, and web. With just a few lines of code, PSPDFKit Instant gives your users a massive productivity boost.

For more information about Instant, please have a look at our website.

Examples

You can find several sample projects in the Examples folder, including a catalog, Xamarin.Forms, and macOS example.

How to Run the Example Projects

  1. Complete Step 2.
  2. Open the PSPDFKit.sln solution in Visual Studio.
  3. Select the example project and device you want to run it on (alternatively you can also right-click on the project and select "Build Project Name").

4. Tap on the triangle on the left to run the project.

PSPDFKit Instant Example

This example is included in the PSPDFCatalog example, but you can also find the code here.

The PSPDFKit Instant example shows how easy and efficient Instant works. Just go the Instant demo page and tap on Instant on iOS, this will show a code at step three, which you have to enter in the example on your device. Afterwards you'll be connected to the server and you can start testing!

PSPDFCatalog

The PSPDFCatalog project includes various examples for pretty much every use-case and will help you to build your own app with PSPDFKit.

Xamarin.Forms

The XFSample.iOS project is an example showcasing how to build an app with PSPDFKit using Xamarin.Forms.

MacPDFViewer

MacPDFViewer is an easy example on how build a PDF viewer on Mac.

Contributing

Please ensure you signed our CLA so we can accept your contributions.

xamarin-ios's People

Contributors

dalexsoto avatar chrisixflash avatar steipete avatar juliangrosshauser avatar radazzouz avatar steviki avatar davidschreiber avatar phraemer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.