Archive Fails When Using CocoaPods
Q: I’m using CocoaPods and getting the following linker issue when archiving my app:
building for iOS, but linking in dylib file (/Users/radazzouz/Library/Developer/Xcode/DerivedData/Catalog-azzqyxicviyzlcgalyuumdxhcawg/Build/Intermediates.noindex/ArchiveIntermediates/Catalog/BuildProductsPath/Release-iphoneos/PSPDFKit.framework/PSPDFKit) built for iOS Simulator, file '/Users/radazzouz/Library/Developer/Xcode/DerivedData/Catalog-azzqyxicviyzlcgalyuumdxhcawg/Build/Intermediates.noindex/ArchiveIntermediates/Catalog/BuildProductsPath/Release-iphoneos/PSPDFKit.framework/PSPDFKit' for architecture arm64
A: This occurs because you may be using an older version of CocoaPods. PSPDFKit 10 for iOS requires CocoaPods 1.10.0 or later.
To fix this issue, follow the steps below:
-
Update to the latest version of CocoaPods using
sudo gem install cocoapods
. -
Remove your
Podfile.lock
usingrm Podfile.lock
. -
Deintegrate your pods using
pod deintegrate
. -
Make sure your Podfile points to the latest version of PSPDFKit.
-
Run
pod install
.