0

Here's my setup

Env:

  • Mac 10.11.6
  • Gem 2.4.8

Gemfile:

source 'https://rubygems.org'

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

Installed Cocoapods-keys using:

gem install cocoapods-keys

Added Fabric Run Script:

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

Errors:

[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

Fixes that I've tried that didn't work:

  • added export LANG=en_US.UTF-8 to ~/.profile, ~/.bash_profile
  • export LANG=en_US.UTF-8 using this
  • fix permission using this
  • deleted /Pods, Pod.lock and ran bundle install and bundle exec pod install

Things that works:

  • On Terminal, run pod keys

So apparently pod keys runs well on my mac, but XCode doesn't recognise it, any thoughts are greatly appreciated!

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Nicholas Ng
  • 1,428
  • 18
  • 23

1 Answers1

0

Have you tried bundle exec pod install inside the script?

orta
  • 4,225
  • 1
  • 26
  • 34
  • yes I ran that prior to XCode build. I also tried "${PODS_ROOT}/Fabric/iOS/Fabric.framework/run" `bundle exec pod keys get FabricAPIKey` `bundle exec pod keys get FabricAPISecret` – Nicholas Ng Jan 13 '17 at 02:32
  • Here's my [github issue](https://github.com/orta/cocoapods-keys/issues/159#issuecomment-272219033). Appreciate it if you can check it out! – Nicholas Ng Jan 13 '17 at 02:32