Integrating PSPDFKit Using CocoaPods
PSPDFKit is available via CocoaPods. We provide a URL for the Podspec so that you can integrate PSPDFKit with minimum effort, either pinning to a specific version or always getting the latest stable release. If you’re new to CocoaPods, this Getting Started guide will help you.
ℹ️ Note: Please don’t follow our manual integration guide if you’re using CocoaPods. Using
strip-framework.shtogether with CocoaPods won’t work.
❗Important: Please make sure that you have a CocoaPods version >= 1.9.3 installed. You can check your version of CocoaPods with
Read on to see what you have to add to your
Always Use the Latest Release:
1 2 3 4 5 6 7
use_frameworks! target :YourTargetName do pod 'PSPDFKit', podspec: 'https://customers.pspdfkit.com/pspdfkit-macos/latest.podspec' platform :osx, '10.14' end
Pinning to a Specific Version (e.g. 4.2.0):
1 2 3 4 5 6 7
use_frameworks! target :YourTargetName do pod 'PSPDFKit', podspec: 'https://customers.pspdfkit.com/pspdfkit-macos/4.2.0.podspec' platform :osx, '10.14' end
Once you’ve completed the steps above, run
pod install. Try the demo to get started on the integration.
Use Nightly Test Builds
If you have an active license subscription, we can enable access to nightlies on CocoaPods. Once that is done, replace
nightly.podspec to point to the latest nightly build.
Use 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:
1 2 3 4 5 6 7 8
use_frameworks! target :YourTargetName do pod 'PSPDFKit', podspec: 'https://customers.pspdfkit.com/pspdfkit-macos/latest.podspec.json' platform :osx, '10.14' end
To learn more about Podspec checksums, please take a look at the Why does my team’s Podfile.lock Podspec checksums change? blog post.