0

I have a local framework. Since I work from different computers - I have different local paths to this framework. So, whenever I build it on another machine - I need to change the path. That is how I change it:

target 'SomeTarget' do
#    pod 'SomeFramework', :path => 'some/other/local/path'
    pod 'SomeFramework', :path => 'some/local/path'
end

Is there some way to write both paths and the proper path will be selected automatically? Or any other solution which will help to forget about manual daily podfile changes.

1 Answer 1

1

You can set environment variable. For me (I use zsh), it's .zshrc file in my root directory where I set the environment variable.

Example:

In .zshrc file add the next line:

export PATH_TO_SOME_FRAMEWORK="some/local/path"

And after that you can use environment variable in podfile this way:

target 'SomeTarget' do
    pod 'SomeFramework', :path => ENV['PATH_TO_SOME_FRAMEWORK']
end
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.