使用Pod安装Fabric报错:/ios/Pods/Fabric/run不存在,求排查方案
Hey there, I’ve dealt with this exact path issue when working with older Fabric/Crashlytics versions before. Let’s break down the fixes step by step:
Verify your Pods directory structure first
Head over to your project’sios/Podsfolder and check if therunscript actually exists inside the Fabric directory. Sometimes pod installs fail silently due to cache or network issues. Try cleaning up and reinstalling pods to ensure all files are downloaded properly:pod cache clean --all pod deintegrate pod installAfter this, double-check the
Pods/Fabricfolder for therunfile.Adjust the run script path
Older Fabric versions sometimes store therunscript inside the Crashlytics framework instead of the Fabric folder. Try updating your build phase script to use this path instead:"${PODS_ROOT}/Crashlytics/iOS/Crashlytics.framework/run" <API KEY> <S KEY>If that doesn’t work, manually locate the
runscript in your Pods directory and paste the full absolute path (or correct relative path) into the script.Check Xcode’s working directory setting
A misconfigured working directory can throw off the${PODS_ROOT}environment variable. Go to your target’sEdit Scheme→Run→Optionstab. If "Use custom working directory" is checked, either uncheck it or set the path to your project’s root directory (the one containing theiosfolder).Review Podfile and installation logs
Make sure your Podfile correctly specifies the versions you need:pod 'Fabric', '~> 1.7.6' pod 'Crashlytics', '~> 3.10.1'Re-run
pod installand watch the terminal output closely—look for any warnings or errors related to Fabric/Crashlytics failing to download or extract files. Permission issues can sometimes prevent therunscript from being added.Clear Xcode’s Derived Data
Stale cached data in Derived Data can cause weird path-related bugs. To fix this:- Open Xcode → Go to
Preferences→Locations - Click the arrow next to the Derived Data path to open the folder
- Delete the folder corresponding to your project
- Restart Xcode and rebuild your project
- Open Xcode → Go to
Quick note: Keep in mind Fabric was deprecated and merged into Firebase, but since you’re targeting these specific legacy versions, the above steps should resolve the path issue.
内容的提问来源于stack exchange,提问作者saas

