Archive Fails When Using CocoaPods
Q: I am using CocoaPods, and I am getting the following linker issue when archiving my app:
Copy
1 | 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, please follow the steps below:
- Update to the latest version of CocoaPods:
sudo gem install cocoapods
- Remove your
Podfile.lock
:rm Podfile.lock
- Deintegrate your Pods:
pod deintegrate
- Make sure your Podfile points to the latest version of PSPDFKit.
- Run
pod install