Skip to content

Instantly share code, notes, and snippets.

@niklasberglund
Created September 13, 2014 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save niklasberglund/4534113ce7db9572e772 to your computer and use it in GitHub Desktop.
Save niklasberglund/4534113ce7db9572e772 to your computer and use it in GitHub Desktop.
Example of how you can get project dir and file path in a podspec's prepare_command
# Get project directory path
current_pwd="$PWD"
project_dir=`cd "../../"; pwd`
cd "$current_pwd"
# Get .xcodeproj file path (yes I know it's not a file)
project_file=`find "$project_dir" -maxdepth 1 -name "*.xcodeproj" | tail -1`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment