> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/ios/get-started/get-started/cordova.md).

# Integrate iOS PDF library with Cordova

Integrate a free trial of the Apryse Native Plugin for iOS applications using Cordova with this comprehensive guide. Learn how to set up and add the plugin to your project for unlimited trial usage an

{% hint style="warning" %}
This project is no longer in development. If you are looking for cross-platform solution, check out [React Native](https://github.com/ApryseSDK/pdftron-react-native/) or [Flutter](https://github.com/ApryseSDK/pdftron-flutter/). If you are looking to add to your current Cordova/Ionic project, check out the [WebViewer sample](https://github.com/ApryseSDK/webviewer-cordova-sample/).
{% endhint %}

This guide will help you integrate a free trial of the Apryse Native Plugin for iOS applications using Cordova. Your free trial includes unlimited trial usage and support from solution engineers.

**Note:** There are other approaches that can be used to integrate Apryse technology with Cordova. Please see [this FAQ page](/ios/guides/cordova/pdftron-ionic-cordova-options.md) to find out more about the relative strengths of each approach.

## Prerequisites

* [Node.js](https://nodejs.org/en/) and [npm](https://www.npmjs.com/get-npm/)
* [Cordova CLI](https://cordova.apache.org/docs/en/latest/guide/cli/#installing-the-cordova-cli)
* [Xcode](https://developer.apple.com/xcode/)
* Apryse iOS SDK

Download the SDK

[Download](https://docs.apryse.com/downloads/ios/dmg/PDFNet.dmg)

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
Take note of the location of your `PDFNet.dmg` download.
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**No trial license key required.**

The trial of Apryse Mobile SDK does not require a trial key. A commercial license key is required for use in a production environment. Please [contact sales](https://apryse.com/form/contact-sales) to purchase a commercial key or if you need any other license key assistance.
{% endhint %}

{% hint style="warning" %}
**Keep your license keys confidential.**

License keys are uniquely generated. Please make sure that it is not publicly available (e.g. in your public GitHub).
{% endhint %}

## Setup

If you don't already have a Cordova codebase, start one. If you do, then make sure iOS is added as a platform and skip to integration.

1. Create a new Cordova project called `pdfhello`

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
cordova create pdfhello com.example.pdf pdfhello

 cd pdfhello
```

{% endcode %}
{% endtab %}
{% endtabs %}

1. Add iOS as a platform to build the Cordova application for.

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
cordova platform add ios
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Integrate Apryse Native Plugin into your Cordova Application

1. Add the `pdftron-cordova` plugin in your project directory.

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
cordova plugin add https://github.com:PDFTron/pdftron-cordova.git
```

{% endcode %}
{% endtab %}
{% endtabs %}

1. From your `PDFNet.dmg` download, copy the `/Lib/` folder into `pdfhello/platforms/ios/pdfhello/`
2. Open the project in Xcode. You can do this by double-clicking the `pdfhello/platforms/ios/pdfhello.xcodeproj` file.
3. Select the project in the left pane and go to the `General` tab. Scroll down to find the `Embedded Binaries` section. Here, add `Lib/Tools/Tools.framework` and `Lib/Framework-dynamic.PDFNet.framework` from the `Lib/` folder you copied into your project. You can do this by dragging them in from Finder or by clicking the `+` sign to browse your files.

![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-a136aaf1b7c5cc4168f58be9a879ddea17ad1dd9%2F3542f947892747a261095d2d53cad43b3884b0eb-2803x1647.png?alt=media)

1. Go to the `Build Phases` tab and click on the `+` button to add a `New Run Script Phase`. Copy and paste the following into the shell command:This will ensure invalid slices are striped from the framework before being submitted to the app store ([a longstanding Xcode bug](http://www.openradar.me/radar?id=6409498411401216)).

{% tabs %}
{% tab title="Bash" %}
{% code lineNumbers="true" %}

```bash
bash "$BUILD_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/PDFNet.framework/strip-framework.sh"
```

{% endcode %}
{% endtab %}
{% endtabs %}

![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-43349f0475107c2500dcce815e7f90d3bb43aa10%2F89668cae1f6a179399d641006b1bd08ff4672791-2800x1644.png?alt=media)

## Next step

<a href="/ios/get-started/get-started/cordova/view-a-document.md" class="button primary">View a document</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/ios/get-started/get-started/cordova.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
