Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods requires update each time on different computers through dropbox sync for bolts framework

My setup:

  • Xcode Project inside dropbox folder
  • Cocoapods installed
  • Parse is in my podfile which requires the Bolts framework

Every time I load up the workspace after having edited it from a different computer, Xcode complains about a duplicate interface definition for class 'BFAppLink' (which is from the Bolts framework). This is fixed by "pods update".

Any ideas?

like image 970
Ryan F Avatar asked Dec 29 '25 05:12

Ryan F


2 Answers

I ran into the same issue with Dropbox and the Parse pod. I investigated and found that CocoaPods keeps symlinks to your headers in ./Pods/Headers for some reasons Dropbox will actually copy the files on the other computer instead of just copying the symlink.

When you compile on your second computer there's 2 copies of the .h files so Xcode complains and won't compile until you run pod install (which will replace the duplicate .h files with the symlinks like it should). But then your other computers which compiled fine will get their symlinks replaced with duplicates of the header files.

The way I found around this was to add /Pods/Headers to the selective sync in Dropbox so they won't get sync. Then run pod install on all your computers and they should be able to compile.

I hope that helped

like image 128
Billy Lavoie Avatar answered Dec 31 '25 17:12

Billy Lavoie


It's likely that the pod update is rewriting your Xcode project and getting rid of the duplicate file imports. Instead of storing the project on Dropbox, can you store it in an actual SCM system like git, perhaps using a service like GitHub or BitBucket?

like image 34
Jon Shier Avatar answered Dec 31 '25 18:12

Jon Shier