New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development pods not picking up changes #4986

Closed
kylerobson opened this Issue Mar 6, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@kylerobson

kylerobson commented Mar 6, 2016

Report

What did you do?

  • In project Foo:
  • Add a Podfile, using a pod such as:
  • pod 'Bar', :path => '../bar-project'
  • pod install
  • Add Pods/ to gitignore
  • On another copy of the repo for Foo and Bar, add new files to Bar project, update Foo to use them.
    Add changes and commit to git.
  • In the original copy of the repo Foo/Bar, pull the changes. Try to run the project. Should error about missing files when you compile. If you do pod update/install it should not fix the issue. rm -rf Pods; pod install will fix the issue. This is not an ideal workflow to do rm -rf Pods every time another developer adds a file to a Pod.

Is there any other way to do this so that a developer who is working on the pod can see changes locally, and then when changes are pushed to source control, other developers get those changes as well without needing to do a "rm -rf Pods/; pod install"?

What did you expected to happen?

Build compiles successfully after pulling the changes.

What happened instead?

Build error.

Podfile

See above for the only important line in the podfile. In my example the Foo and Bar projects are both private repos for use within a company only. Foo repo is for the app, Bar repo is for a framework that app Foo uses and another app uses.

@orta

This comment has been minimized.

Show comment
Hide comment
@orta

orta Mar 6, 2016

Member

CocoaPods can't know about structural changes ( e.g. new/removed files ) to developer pods without pod install being ran, if you don't have your Pods folder checked in. CocoaPods is not running persistently, and won't check unless you request it.

You need to tell CocoaPods that your pod needs updating, so the right way to update is pod update foo instead of nuking everything. If it's a common occurrence in your team, maybe you could add a build phase that checks if that Podfile.lock represents the latest commit for your subproject.

Member

orta commented Mar 6, 2016

CocoaPods can't know about structural changes ( e.g. new/removed files ) to developer pods without pod install being ran, if you don't have your Pods folder checked in. CocoaPods is not running persistently, and won't check unless you request it.

You need to tell CocoaPods that your pod needs updating, so the right way to update is pod update foo instead of nuking everything. If it's a common occurrence in your team, maybe you could add a build phase that checks if that Podfile.lock represents the latest commit for your subproject.

@segiddins segiddins closed this Mar 6, 2016

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Mar 6, 2016

Member

^ What orta said

Member

segiddins commented Mar 6, 2016

^ What orta said

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment