更新CocoaPods至1.5.3后Xcode项目无法运行,求解决办法
Fixes for CocoaPods 1.5.3 Update Run Failure
Hey there, sorry to hear you're stuck with this issue after updating CocoaPods from 1.2.1 to 1.5.3! Let's go through practical solutions that typically resolve this kind of problem:
Clean up CocoaPods cache and project derived data
- Delete the
Podsfolder andPodfile.lockfile from your project directory. - Clear CocoaPods local cache by running this command in terminal:
pod cache clean --all - Clean Xcode's derived data: Use the shortcut
Cmd+Shift+K(or go toProduct > Clean Build Folder), or manually delete the project's folder in~/Library/Developer/Xcode/DerivedData.
- Delete the
Reinstall Pods and use the correct project file
- Navigate to your project's root directory in terminal, then run:
pod install - Critical note: After installation, always open your project via
YourProject.xcworkspace(not the.xcodeprojfile) — this is a common mistake that causes runtime errors.
- Navigate to your project's root directory in terminal, then run:
Verify Build Settings configurations
- Open your project in Xcode, go to
Build Settingsfor your target. - Check
Other Linker Flagsand ensure it includes$(inherited)— this setting often gets messed up during Pod updates, leading to missing framework links. - Similarly, confirm
Framework Search PathsandHeader Search Pathshave$(inherited)included to ensure Xcode finds Pod frameworks correctly.
- Open your project in Xcode, go to
Recheck CocoaPods installation and version compatibility
- If the above steps don't work, reinstall CocoaPods 1.5.3 to rule out a corrupted installation:
sudo gem uninstall cocoapods && sudo gem install cocoapods -v 1.5.3 - Make sure your Xcode version is compatible with CocoaPods 1.5.3 (Xcode 9.0 or later is recommended for this Pods version). If you're on an older Xcode, you might need to either upgrade Xcode or adjust your Pods version.
- If the above steps don't work, reinstall CocoaPods 1.5.3 to rule out a corrupted installation:
If none of these fix the issue, try deleting the ~/Library/Caches/CocoaPods folder, then repeat the pod install step.
内容的提问来源于stack exchange,提问作者ilan
相关产品推荐
相关产品推荐

