【问题标题】:XCode doesn't recognize `pod keys`XCode 无法识别“pod 键”
【发布时间】:2017-08-07 15:24:10
【问题描述】:

这是我的设置

环境:

  • Mac 10.11.6
  • 宝石 2.4.8

宝石文件:

source 'https://rubygems.org'

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

安装Cocoapods-keys 使用:

gem install cocoapods-keys

添加了 Fabric 运行脚本:

"${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修复权限
  • 删除 /Pods、Pod.lock 并运行 bundle installbundle exec pod install

可行的方法:

  • 在终端上,运行pod keys

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

【问题讨论】:

    标签: ios xcode rubygems cocoapods twitter-fabric


    【解决方案1】:

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

    【讨论】:

    • 是的,我在 XCode 构建之前运行了它。我也试过“${PODS_ROOT}/Fabric/iOS/Fabric.framework/run”bundle exec pod keys get FabricAPIKeybundle exec pod keys get FabricAPISecret
    • 这是我的github issue。如果您可以查看,请欣赏它!
    猜你喜欢
    • 1970-01-01
    • 2017-02-08
    • 2018-05-02
    • 1970-01-01
    • 2016-10-01
    • 2020-11-08
    • 2016-03-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多