Advanced Carthage Integration

Warning

Fat frameworks, which are used by Carthage, 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. We recommend migrating from Carthage to Swift Package Manager, which uses XCFrameworks.

Information

Using Carthage may result in errors saying “Incompatible Swift version - framework was built ...” when using a different Xcode version than the version we used to build PSPDFKit. If you see this error, you can work around this harmless warning by using the same version of Xcode we used for the release or by switching to Swift Package Manager or manual integration instead.

Information

Carthage currently doesn’t support Mac Catalyst applications. If you need Mac Catalyst support, you can switch to Swift Package Manager or manual integration instead.

This guide assumes you’ve read the getting started guide for Carthage integration.

Additional Carthage JSON URL Options:

binary "https://my.pspdfkit.com/pspdfkit-ios.json"

Using the above will download the latest PSPDFKit version.

Use the Version Compatible with:

binary "https://my.pspdfkit.com/pspdfkit-ios.json" ~> 10.0

Using the above will download a PSPDFKit version compatible with 10.0. Compatibility is determined according to semantic versioning. This means any version greater than or equal to 10.0, but less than 11.0, will be considered compatible with 10.2.1.

Pinning to a Specific Version (e.g. 10.2.1):

binary "https://my.pspdfkit.com/pspdfkit-ios.json" == 10.2.1

Using the above will download PSPDFKit version 10.2.1.