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

Objective Sharpie执行pod list失败求助,附相关环境信息

Fixing Objective Sharpie's "Failed to run pod list" Error

I've run into this exact issue before, and since your native iOS projects work fine with CocoaPods, the problem is almost certainly related to how Objective Sharpie interacts with your Pod environment rather than CocoaPods itself. Here are the most reliable fixes I've found:

1. Ensure Objective Sharpie can locate the pod executable

Sometimes Sharpie doesn't pick up the correct path to your pod command, especially if you installed CocoaPods via Homebrew or a custom location.

  • First, run which pod in Terminal to get the full path (e.g., /usr/local/bin/pod)
  • Try running Sharpie with the full pod path explicitly: sharpie pod init --pod-path /usr/local/bin/pod (replace with your actual path)
  • If this works, it's an environment variable issue. You can either add the pod path to Sharpie's environment or keep using the full path for future commands.

2. Update Objective Sharpie to a compatible version

Your Sharpie 3.4.0 is pretty outdated, and there are known compatibility gaps with CocoaPods 1.4.0.

  • Uninstall the old version first: sharpie uninstall
  • Install the latest stable version via Homebrew: brew install objective-sharpie, or grab the latest package from official release channels
  • Verify the update with sharpie version, then retry your pod binding command

3. Clear CocoaPods and Sharpie cache files

Cache corruption is a common culprit here:

  • Clear all CocoaPods caches: pod cache clean --all
  • Delete Sharpie's temporary cache directory: rm -rf ~/Library/Caches/com.xamarin.ObjectiveSharpie
  • Restart your terminal and try the Sharpie command again

4. Check for permission issues

Sharpie might not have sufficient access to read/write Pod-related files:

  • Try running the Sharpie command with sudo: sudo sharpie pod init [YourPodName]
  • Note: Files created with sudo will be owned by root, so after running, reset permissions with sudo chown -R $USER:$USER [YourProjectDirectory] to avoid future access problems

5. Manually set up the Pod project first, then use Sharpie

Since your native Pod workflow works, bypass Sharpie's initial pod setup:

  • Create an empty folder, run pod init inside it, then edit the Podfile to include your target pod
  • Run pod install to pull down the dependencies
  • Point Sharpie to this pre-configured project: sharpie pod bind --output=./output ./Podfile

These steps should resolve the "Failed to run pod list" error. For me, updating Sharpie and clearing caches was the quick fix in a similar environment setup.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.19 08:18:19