orta / cocoapods-keys

A key value store for storing per-developer environment and application keys
MIT License
1.55k stars 92 forks source link

XCode Run Script doesn't recognize `pod keys` #159

Closed nicholas-jomo closed 7 years ago

nicholas-jomo commented 7 years ago

First, appreciate the tool! I've also posted on Stackoverflow


Here's my setup

Env:

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

~/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:

Things that works:

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

segiddins commented 7 years ago

bundle exec pod keys might be what you're looking for?

nicholas-jomo commented 7 years ago

I tried

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

it would give me this error, which is different from the above

error: Fabric: Configuration Issue

Fabric API key not valid. Your Fabric run script build phase should contain your API key: ./Fabric.framework/run INSERT_YOUR_API_KEY INSERT_YOUR_BUILD_SECRET

nicholas-jomo commented 7 years ago

i guess this is related to #116 and seems not cocoapods-keys issue, closing and thanks