Integrating PSPDFKit Using CocoaPods
PSPDFKit is available via CocoaPods. We provide a private 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.
If you are using Swift, consider adding our optional PSPDFKit.Swift wrapper.
Note: Please don’t follow our manual integration guide if you’re using CocoaPods. Using
strip-framework.sh together with CocoaPods won’t work.
Important: Please make sure that you have a CocoaPods version >= 1.4.0 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
use_frameworks! target :YourTargetName do pod 'PSPDFKit', podspec: 'https://customers.pspdfkit.com/cocoapods/YOUR_COCOAPODS_KEY_GOES_HERE/pspdfkit/latest.podspec' end
Pinning to a Specific Version (e.g. 6.9.3):
1 2 3 4 5
use_frameworks! target :YourTargetName do pod 'PSPDFKit', podspec: 'https://customers.pspdfkit.com/cocoapods/YOUR_COCOAPODS_KEY_GOES_HERE/pspdfkit/6.9.3.podspec' end
Once you’ve completed the steps above, run
pod install. Try the demo to get started on the integration.
Where Do I Find the Podspec URL Key?
If you are a customer, you can find your custom URL in your customer portal by choosing the Use CocoaPods tab when downloading PSPDFKit. If you are a new customer, you can get a demo Podspec URL by clicking on the trial button on our website. If you would like to purchase a license, please contact our sales team with your use case and the features you would like.
To manually integrate PSPDFKit, see Integrating PSPDFKit Manually.
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.
In PSPDFKit for iOS 7.0.3, we added dSYM support for CocoaPods for all frameworks. CocoaPods will automatically pick up the dSYMs for improved symbolication. CocoaPods 1.3.0 or later is required.
You can add PSPDFKit to your test targets like this:
1 2 3
target :YourTargetNameTests do pod 'PSPDFKit', podspec: 'https://customers.pspdfkit.com/cocoapods/YOUR_COCOAPODS_KEY_GOES_HERE/pspdfkit/latest.podspec' end
You can also use CocoaPods Inheritance Mode to inherit all of your main target’s dependencies by using
inherit! :complete, like so:
1 2 3
target :YourTargetNameTests do inherit! :complete end