# Podmode Podmode is a small tool that allows you to easily specify a local directory for a development pod when using Cocoapods. You can dynamically switch between using the local project or checking out the project from its remote source url. It allows for different configurations without needing to alter the Podfile. Across developers the local path will vary, and the CI server will likely need to check out the project from the server. ## Installation You can install the gem as follows: $ gem install ./podmode-0.1.0.gem You might need to install `dotenv` too: $ gem install dotenv ### Troubleshooting It might be that you run into trouble when running podmode. Make sure the required directory is created, by executing: ```bash mkdir -p ~/.touchwonders/podmodes/ ``` ## Defining a Podmode for a local project In the terminal, navigate to a project directory that contains a podspec. You can run `podmode` to see available options. Run the following to create a `podmode` for your project: ```bash podmode create YourProject ``` You'll be asked to specify a mode. Select 1: local. You'll then be asked to specify the path. You can enter `.` to specify the current directory. In the Podfile that needs to include your project, you can specify the podmode as follows: ``` require 'podmode' ... pod 'YourProject', Podmode::Podmode.new('YourProject', 'git@gitlab.api-touchwonders.com:components/yourproject.git').options() ... ``` This will ensure the Podfile will target the local directory that you specified for your project. ## Other modes You can specify a different pod mode on creation or when editing an existing `podmode`. ### Auto Will use the git url specified in the Podfile (see above), using the default branch. ### Branch Will use the git url specified in the Podfile, using the branch specified in the `podmode`. ### Tag Will use the git url specified in the Podfile, using the tag specified in the `podmode`.