XCode无法识别“pod键”

时间:2017-01-12 14:57:07

标签: ios xcode rubygems cocoapods twitter-fabric

这是我的设置

ENV:

  • Mac 10.11.6
  • 宝石2.4.8

的Gemfile:

source 'https://rubygems.org'

gem 'cocoapods', '~> 1.1.1'
gem 'cocoapods-keys', '~> 1.7.0'
gem 'fastlane'

使用以下方式安装Cocoapods-keys

gem install cocoapods-keys

添加了Fabric Run Script:

"${PODS_ROOT}/Fabric/iOS/Fabric.framework/run" `pod keys get FabricAPIKey` `pod keys get FabricAPISecret`

错误:

[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:

export LANG=en_US.UTF-8
[0m
~/Development/Projects/ABC/raven/Pods/Fabric/iOS/Fabric.framework/run: eval: line 18: syntax error near unexpected token `('
~/Development/Projects/ABC/raven/Pods/Fabric/iOS/Fabric.framework/run: eval: line 18: `"~/Development/Projects/ABC/raven/Pods/Fabric/iOS/Fabric.framework/uploadDSYM" [!] Unknown command: `keys` Did you mean: repo Usage: $ pod COMMAND CocoaPods, the Cocoa library package manager. Commands: + cache Manipulate the CocoaPods cache + init Generate a Podfile for the current directory. + install Install project dependencies to Podfile.lock versions + ipc Inter-process communication + lib Develop pods + list List pods + outdated Show outdated project dependencies + plugins Show available CocoaPods plugins + repo Manage spec-repositories + search Search for pods. + setup Setup the CocoaPods environment + spec Manage pod specs + trunk Interact with the CocoaPods API (e.g. publishing new specs) + try Try a Pod! + update Update outdated project dependencies and create new Podfile.lock Options: --silent Show nothing --version Show the version of the tool --verbose Show more debugging information --no-ansi Show output without ANSI codes --help Show help banner of specified command [!] Unknown command: `keys` Did you mean: repo Usage: $ pod COMMAND CocoaPods, the Cocoa library package manager. Commands: + cache Manipulate the CocoaPods cache + init Generate a Podfile for the current directory. + install Install project dependencies to Podfile.lock versions + ipc Inter-process communication + lib Develop pods + list List pods + outdated Show outdated project dependencies + plugins Show available CocoaPods plugins + repo Manage spec-repositories + search Search for pods. + setup Setup the CocoaPods environment + spec Manage pod specs + trunk Interact with the CocoaPods API (e.g. publishing new specs) + try Try a Pod! + update Update outdated project dependencies and create new Podfile.lock Options: --silent Show nothing --version Show the version of the tool --verbose Show more debugging information --no-ansi Show output without ANSI codes --help Show help banner of specified command validate run-script'
Command /bin/sh failed with exit code 1

我尝试过的修复程序不起作用:

  • export LANG=en_US.UTF-8添加到〜/ .profile,〜/ .bash_profile
  • 使用this
  • 导出LANG = en_US.UTF-8
  • 使用this
  • 修复权限
  • 已删除/已播放,已解锁并已运行bundle installbundle exec pod install

有效的方法:

  • 在终端上,运行pod keys

显然pod keys在我的Mac上运行良好,但XCode无法识别它,任何想法都非常感谢!

1 个答案:

答案 0 :(得分:0)

您是否在脚本中尝试了bundle exec pod install