---
title: "Advanced CocoaPods integration"
canonical_url: "https://www.nutrient.io/guides/ios/miscellaneous/advanced-cocoapods-integration/"
md_url: "https://www.nutrient.io/guides/ios/miscellaneous/advanced-cocoapods-integration.md"
last_updated: "2026-05-15T19:10:05.016Z"
description: "This guide assumes you’ve read the getting started guide for CocoaPods integration. for Nutrient iOS SDK."
---

# Advanced CocoaPods integration

This guide assumes you’ve read the getting started guide for [CocoaPods integration](https://www.nutrient.io/sdk/ios/getting-started/ios-cocoapods.md).

## Preparation for trunk becoming read-only

We will stop publishing to the CocoaPods specs repository (aka trunk) soon in preparation for [this service becoming read-only](https://blog.cocoapods.org/CocoaPods-Specs-Repo/). Our documentation has always shown adding our `pod` using an explicit `podspec` URL rather than from trunk, and this setup will continue to work. If you modified your Podfile to specify `pod 'PSPDFKit'` only, then change this to include the `podspec` argument, as shown below.

We recommend [migrating from CocoaPods to Swift Package Manager](https://www.nutrient.io/guides/ios/knowledge-base/how-do-i-migrate-from-cocoapods-to-spm.md), which is more modern and actively maintained.

## Additional Podspec options

### Always use the latest release (recommended)

```ruby

use_frameworks!

target :YourTargetName do
	pod 'PSPDFKit',
	    podspec: 'https://my.nutrient.io/pspdfkit-ios/latest.podspec'
end

```

### Pinning to a specific version (e.g. 13.1.0)

```ruby

use_frameworks!

target :YourTargetName do
	pod 'PSPDFKit',
	    podspec: 'https://my.nutrient.io/pspdfkit-ios/13.1.0.podspec'
end

```

### Using nightly builds

Replace `latest.podspec` with `nightly.podspec` to point to the latest [nightly build](https://www.nutrient.io/guides/ios/best-practices/nightly-builds.md):

```ruby

use_frameworks!

target :YourTargetName do
	pod 'PSPDFKit',
	    podspec: 'https://my.nutrient.io/pspdfkit-ios/nightly.podspec'
end

```

### Using a JSON Podspec

CocoaPods makes a checksum of the JSON representation of your Podspec and keeps it in your `Podfile.lock` file. If your development environment requires you to use a JSON Podspec, you can append `.json` to your CocoaPods URL, like so:

```ruby

use_frameworks!

target :YourTargetName do
	pod 'PSPDFKit',
	    podspec:
			'https://my.nutrient.io/pspdfkit-ios/latest.podspec.json'
end

```

To learn more about Podspec checksums, refer to the [Why does my team’s Podfile.lock Podspec checksums change?](https://artsy.github.io/blog/2016/05/03/podspec-checksums/) blog post.

### Using fat frameworks instead of XCFrameworks

Fat frameworks are a legacy distribution option that rely on iOS devices and Simulator using different processor architectures. Using fat frameworks leads to undefined behavior when running on Simulator on Apple silicon Macs and can cause crashes because the ARM64 slice isn’t compiled for a simulator. XCFrameworks are Apple’s solution to this problem. See our [getting started](https://www.nutrient.io/sdk/ios/getting-started.md) guide to learn how to integrate Nutrient using XCFrameworks.

We offer XCFrameworks as the default CocoaPods artifacts. If your project environment requires you to use old fat `.framework` files instead, you can append `-framework` to the version number of your CocoaPods URL, like so:

```ruby

use_frameworks!

target :YourTargetName do
	pod 'PSPDFKit',
	    podspec:
			'https://my.nutrient.io/pspdfkit-ios/latest-framework.podspec'
end

```

## Integrating Nutrient into test targets

You can add Nutrient to your test targets like this:

```ruby

target :YourTargetNameTests do
	pod 'PSPDFKit',
	    podspec: 'https://my.nutrient.io/pspdfkit-ios/latest.podspec'
end

```

You can also use [CocoaPods inheritance mode](https://guides.cocoapods.org/syntax/podfile.html#inherit_bang) to inherit all of your main target’s dependencies by using `inherit! :complete`, like so:

```ruby

target :YourTargetNameTests do
	inherit! :complete
end

```
---

## Related pages

- [Advanced Carthage integration](/guides/ios/miscellaneous/advanced-carthage-integration.md)
- [Airdrop](/guides/ios/features/airdrop.md)
- [Bitcode](/guides/ios/faq/bitcode.md)
- [App Transport Security](/guides/ios/pspdfkit-instant/app-transport-security.md)
- [Framework Size](/guides/ios/faq/framework-size.md)
- [Customizing The Page Number](/guides/ios/customizing-pdf-pages/customizing-the-page-number.md)
- [Customizing the log level on iOS](/guides/ios/features/logging.md)
- [About Memory Usage](/guides/ios/memory-and-storage/about-memory-usage.md)
- [Nightly Builds](/guides/ios/best-practices/nightly-builds.md)
- [Saving Data Externally](/guides/ios/memory-and-storage/saving-data-externally.md)
- [Optimize PDF documents for mobile rendering on iOS](/guides/ios/miscellaneous/optimize-pdf-documents-for-mobile-rendering.md)
- [Modifying permissions in your iOS app](/guides/ios/getting-started/permissions.md)
- [Carthage integration](/guides/ios/best-practices/carthage-integration.md)
- [iOS PDF SDK security](/guides/ios/faq/sdk-security.md)
- [Powered By Nutrient](/guides/ios/miscellaneous/powered-by-nutrient.md)
- [Using Document Efficiently](/guides/ios/getting-started/using-document-efficiently.md)
- [Reduce App Size](/guides/ios/best-practices/reduce-app-size.md)
- [Strategies For Multiple Bundle Ids](/guides/ios/faq/strategies-for-multiple-bundle-ids.md)
- [Youtube Links](/guides/ios/miscellaneous/youtube-links.md)
- [Manage your iOS status bar with view controllers](/guides/ios/faq/view-controller-based-status-bar-appearance.md)
- [Using Automatic Saving Safely](/guides/ios/best-practices/using-automatic-saving-safely.md)
- [Transferring File Edits To A Server](/guides/ios/best-practices/transferring-file-edits-to-a-server.md)
- [Version Numbering](/guides/ios/best-practices/version-numbering.md)
- [Third Party Compatibility](/guides/ios/miscellaneous/third-party-compatibility.md)

