This guide covers the steps needed to use the Carthage dependency manager to add PSPDFKit to an iOS app.
We recommend migrating from Carthage to Swift Package Manager.
Open your project’s Cartfile in a text editor and add the PSPDFKit dependency:
The Carthage JSON URL from above will ensure you always use the latest available version of PSPDFKit. Alternatively, you can select a specific version to update at your own pace. Take a look at our advanced Carthage integration guide for more details.
In the terminal, change the directory to the location of your Cartfile:
carthage updateand wait for Carthage to download PSPDFKit.
Open your application’s project or workspace in Xcode.
Drag the binaries from
Carthage/Build/iOSinto the Frameworks, Libraries, and Embedded Content section of your target.
To work around the compatibility issue between fat frameworks and Xcode 12, make sure
EXCLUDED_ARCHSfor iOS Simulator SDK is set to arm architectures (
arm64) in your project configuration. This ensures you’ll avoid running into an issue while building for iOS Simulator:
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;