---
title: "Add PDF functionality on iOS | Nutrient iOS SDK"
canonical_url: "https://www.nutrient.io/sdk/ios/getting-started/ios-cocoapods/"
md_url: "https://www.nutrient.io/sdk/ios/getting-started/ios-cocoapods.md"
last_updated: "2026-05-15T19:10:05.144Z"
description: "Learn how to integrate Nutrient iOS SDK into your iOS application. Step-by-step guide for adding PDF viewing, editing, and annotation features."
---

# Add PDF functionality on iOS

This guide explains how to integrate Nutrient iOS SDK into a new or existing iOS project. By the end, you’ll be able to display a PDF document using the default Nutrient user interface (UI).

**Jump to example**

Prefer to jump straight to code? View the example repo on GitHub.

[Read more](https://github.com/PSPDFKit/pspdfkit-ios-catalog.git)

## Requirements

- A Mac running macOS

- The [latest stable version of Xcode](https://developer.apple.com/xcode/)

- [Install CocoaPods](https://guides.cocoapods.org/using/getting-started)

## Creating your project

Skip this step if you’re using an existing project. If you’re starting a new iOS app, follow the steps below.

**Steps:**

1. Open Xcode and select **File** > **New** > **Project**.

2. Select the **iOS** tab and choose the **App** template.

3. Enter your product name (for example, Nutrient-Demo) and organization identifier (for example, com.example). Choose **Storyboard** as the interface.

4. Click **Next**, choose a location to save the project, and click **Create**.

## Adding Nutrient to your project

**Steps:**

1. In the terminal, navigate to your project directory:

   ```

   cd path/to/YourProject
   ```

2. If you don’t have a Podfile, run the following:

   ```

   pod init
   ```

3. Edit your Podfile and add the following:

   ```

   target 'PSPDFKit-Demo' do
    use_frameworks!
    pod 'PSPDFKit', podspec: 'https://my.nutrient.io/pspdfkit-ios/latest.podspec'
   end
   ```

   > `latest.podspec` will ensure you always use the latest available version of Nutrient. Alternatively, you can select a specific version by replacing `latest.podspec` with a version number podspec (for example, `10.2.0.podspec`) to update at your own pace. Refer to our guide on [advanced CocoaPods integration](https://www.nutrient.io/guides/ios/miscellaneous/advanced-cocoapods-integration.md) for version pinning options.

4. Run the following:

   ```

   pod install
   ```

5. Open the `.xcworkspace` file Xcode created.

For information on adding Nutrient to your project manually or using Swift Package Manager, refer to the respective guides on [manual integration](https://www.nutrient.io/sdk/ios/getting-started/ios-manual-integration.md) and [Swift Package Manager](https://www.nutrient.io/sdk/ios/getting-started.md).

## Displaying a PDF

**Steps:**

1. Add your PDF file to the project by dragging it into the Xcode project navigator. Click **Finish** when prompted.

2. In your `UIViewController` subclass, import the Nutrient SDK:

   ### Swift

   ```swift

   import PSPDFKit
   import PSPDFKitUI
   ```

   ### Objective-C

   ```objective-c

   @import PSPDFKit;
   @import PSPDFKitUI;
   ```

3. Display the PDF using the following code. You can place this inside [`viewDidAppear(_:)`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621423-viewdidappear), a button action handler, a table view cell selection delegate, or any other suitable place:

   ### Swift

   ```swift

     // Update to use your document name.
    let fileURL = Bundle.main.url(forResource: "Document", withExtension: "pdf")!
    let document = Document(url: fileURL)

    // The configuration closure is optional and allows additional customization.
    let pdfController = PDFViewController(document: document) {
      $0.isPageLabelEnabled = false
    }

    // Present the PDF view controller within a `UINavigationController` to show built-in toolbar buttons.
    present(UINavigationController(rootViewController: pdfController), animated: true)
   ```

   ### Objective-C

   ```objective-c

    // Update to use your document name.
    NSURL *documentURL = [NSBundle.mainBundle URLForResource:@"Document" withExtension:@"pdf"];
    PSPDFDocument *document = [[PSPDFDocument alloc] initWithURL:documentURL];

    // The configuration object is optional and allows additional customization.
    PSPDFViewController *pdfController = [[PSPDFViewController alloc] initWithDocument:document configuration:[PSPDFConfiguration configurationWithBuilder:^(PSPDFConfigurationBuilder *builder)
    {
    builder.pageLabelEnabled = NO;
    }]];

    // Present the PDF view controller within a `UINavigationController` to show built-in toolbar buttons.
    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:pdfController];
    [self presentViewController:navController animated:YES completion:NULL];
   ```

4. Build and run your application.

You’ll should now see your PDF document displayed using Nutrient’s built-in viewer.

## Next steps

- [Add AI capabilities to Nutrient’s document viewer](https://www.nutrient.io/guides/ios/ai-assistant.md)

- [Customize the UI and other SDK functionality](https://www.nutrient.io/guides/ios/getting-started/view-controller-configuration.md)

- [Add document collaboration through Instant](https://www.nutrient.io/guides/ios/pspdfkit-instant/getting-started.md)

- [Add OCR support to recognize text in scanned documents](https://www.nutrient.io/guides/ios/ocr/getting-started.md)

For getting started on Mac Catalyst or visionOS, first follow the same instructions above, and then refer to the [Mac Catalyst and visionOS](https://www.nutrient.io/sdk/ios/getting-started/mac-catalyst-or-visionos.md) guide for specific instructions.
---

## Related pages

- [Add PDF functionality on iOS](/sdk/ios/getting-started.md)
- [Add PDF functionality on iOS](/sdk/ios/getting-started/ios-manual-integration.md)
- [Add PDF functionality on Mac Catalyst or visionOS](/sdk/ios/getting-started/mac-catalyst-or-visionos.md)

