Upgrading

In this guide, we cover how to migrate to the latest version of PSPDFKit for all integration methods.

XCFramework Manual Integration

In most cases, all you need to do to upgrade a manual PSPDFKit integration is replace the PSPDFKit.xcframework and PSPDFKitUI.xcframework files in your project’s references. Simply copy the new PSPDFKit.xcframework and PSPDFKitUI.xcframework files to the disk location of your existing PSPDFKit.xcframework and PSPDFKitUI.xcframework files and replace them when prompted.

Swift Package Manager

Go to the project’s Swift Packages tab and edit the package options version rule to always use the latest release. If you used a specific version instead, then update the package options to the desired version.

CocoaPods

If you set up your Podfile to use the latest release URL, all you need to do is issue pod update. If you used a pinned version URL instead, first update the URL to the desired version and then run pod update.

Carthage

If you set up your Cartfile to use the latest release, all you need to do is issue carthage update. If you used a specific version instead, first update the URL to the desired version and then run carthage update.

API Changes

After an upgrade, you might see new warnings or build errors due to PSPDFKit API changes. Commonly used APIs are normally deprecated before being changed — we annotate these methods with @Deprecated and provide a migration strategy. We recommend you upgrade deprecated APIs as soon as possible, as APIs that are less commonly used may be changed without prior notice and this might lead to build failures on your side. If that happens, please consult the changelog and the migration guides for details on how to resolve the issue.