You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

更新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

    1. Delete the Pods folder and Podfile.lock file from your project directory.
    2. Clear CocoaPods local cache by running this command in terminal:
      pod cache clean --all
      
    3. Clean Xcode's derived data: Use the shortcut Cmd+Shift+K (or go to Product > Clean Build Folder), or manually delete the project's folder in ~/Library/Developer/Xcode/DerivedData.
  • Reinstall Pods and use the correct project file

    1. Navigate to your project's root directory in terminal, then run:
      pod install
      
    2. Critical note: After installation, always open your project via YourProject.xcworkspace (not the .xcodeproj file) — this is a common mistake that causes runtime errors.
  • Verify Build Settings configurations

    1. Open your project in Xcode, go to Build Settings for your target.
    2. Check Other Linker Flags and ensure it includes $(inherited) — this setting often gets messed up during Pod updates, leading to missing framework links.
    3. Similarly, confirm Framework Search Paths and Header Search Paths have $(inherited) included to ensure Xcode finds Pod frameworks correctly.
  • Recheck CocoaPods installation and version compatibility

    1. 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
      
    2. 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 none of these fix the issue, try deleting the ~/Library/Caches/CocoaPods folder, then repeat the pod install step.

内容的提问来源于stack exchange,提问作者ilan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 07:04:58