xamarin - 客观 Sharpie 错误 : Failed to run pod list

标签 xamarin xamarin.ios cocoapods objective-sharpie

我正在使用 Cocoapods 1.4.0、Visual Studio Community for Mac 7.3.3 (build 12)、Objective Sharpie 3.4.0-c0f0e73、Mac OS 10.12.6 (Sierra)

每当我尝试在 https://developer.xamarin.com/guides/cross-platform/macios/binding/objective-sharpie/examples/cocoapod/ 上添加示例 Cocoapod 时

我收到以下错误:

mbp:iOS user$ sharpie pod init ios AFNetworking
** Setting up CocoaPods master repo ...
   (this may take a while the first time)
Setting up CocoaPods master repo
  $ /usr/bin/git -C /Users/user/.cocoapods/repos/master fetch origin
  --progress
  remote: Counting objects: 1101, done.        
  remote: Compressing objects: 100% (224/224), done.        
  remote: Total 1101 (delta 540), reused 465 (delta 465), pack-reused 402        
  Receiving objects: 100% (1101/1101), 165.70 KiB | 2.91 MiB/s, done.
  Resolving deltas: 100% (690/690), completed with 258 local objects.
  From https://github.com/CocoaPods/Specs
     6a7b167b826..807a5994b64  master     -> origin/master
  $ /usr/bin/git -C /Users/user/.cocoapods/repos/master rev-parse
  --abbrev-ref HEAD
  master
  $ /usr/bin/git -C /Users/user/.cocoapods/repos/master reset --hard
  origin/master
  HEAD is now at 807a5994b64 [Add] SwiftyGif 4.1.0
Setup completed
** Searching for requested CocoaPods ...
error: Failed to run pod list

有谁知道为什么,以及谁来解决这个问题?

我只是想添加一个 Pod。

注意:尝试在原生 iOS 项目上使用 CocoaPods 时没有问题

最佳答案

使用全新安装的 CocoaPods 和 Objective Sharpie,这对我来说很好用。

从 Homebrew 安装 CocoaPods:

brew install cocoapods



查找最新 Objective Sharpie release on the Xamarin Forums并通过双击 pkg 文件进行安装。

现在只需运行您已经尝试过的相同命令:

sharpie pod init ios AFNetworking


--- ~/derp » sharpie pod init ios AFNetworking
** Setting up CocoaPods master repo ...
   (this may take a while the first time)
Ignoring executable-hooks-1.4.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.4.2
Ignoring gem-wrappers-1.3.2 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.3.2
Setting up CocoaPods master repo
  $ /usr/local/bin/git -C /Users/tomasci/.cocoapods/repos/master fetch origin --progress
Enter passphrase for key '/Users/tomasci/.ssh/cheesebaron-github':
  remote: Counting objects: 36, done.
  remote: Compressing objects: 100% (33/33), done.
  remote: Total 36 (delta 22), reused 0 (delta 0), pack-reused 0
  From ssh://github.com/CocoaPods/Specs
     e874a97a946..0d05aca4c0d  master     -> origin/master
  $ /usr/local/bin/git -C /Users/tomasci/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
  master
  $ /usr/local/bin/git -C /Users/tomasci/.cocoapods/repos/master reset --hard origin/master
  HEAD is now at 0d05aca4c0d [Add] XTFMDB 1.5.0

CocoaPods 1.6.0.beta.1 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.6.0.beta.1

Setup completed
** Searching for requested CocoaPods ...
** Working directory:
**   - Writing Podfile ...
**   - Installing CocoaPods ...
**     (running `pod install --no-repo-update`)
Ignoring executable-hooks-1.4.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.4.2
Ignoring gem-wrappers-1.3.2 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.3.2
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.2.1)
Enter passphrase for key '/Users/tomasci/.ssh/cheesebaron-github':
Generating Pods project
Skipping User Project Integration
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
** 🍻  Success! You can now use other `sharpie pod` commands.

这里唯一可能不同的是我为 GitHub 设置了 ssh 配置。

关于xamarin - 客观 Sharpie 错误 : Failed to run pod list,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48792634/

相关文章:

ios - 谷歌登录 : value of type GIDSignInResult has no member 'authentication'

ios - CLLocation DistanceFrom 性能影响

c# - 如何在 Xamarin.Forms 中使用 BindableProperty.Create?

c# - Xamarin.Forms 中的 IOS 联系人邮政地址

ios - Xamarin.iOS/Akavache - 使用自定义 EncryptionProvider 的加密缓存

ios - 使用未解析的标识符 'PhoneAuthProvider'

xamarin - Xamarin iOS应用程序被App Store拒绝,因为它不能在仅IPv6的环境中使用

c# - Xamarin Android - 如何将事件从 MainActivity 传递到表单页面上的 ViewModel?

ios - Xamarin 中的 NSUrlSession

ios - 无法添加带有 url 的源