I have some large .a files stored in GitHub LFS and listed in my podspec as vendored_libraries. When I run pod install they do not get copied to my pod directory, am I doing something wrong or is this functionality not supported?
What needs to be done beyond git clone
to download LFS stuff? Can you give us an example podspec we can investigate with?
It's an extension to git: https://git-lfs.github.com/?utm_source=github_site&utm_medium=blog&utm_campaign=gitlfs
I'm not really sure what is added haven't been able to figure out yet, will look into this. Unfortunately my podspec is for work and I cannot share, however the podspec was not changed at all to support lfs, it just adds a .gitattributes to describe which files are stored in lfs
Right but we need access to a repo setup however it has to be for LFS to determine what needs to be done in the CocoaPods downloader to support it.
As a point of reference: I'm using cocoapods with git-lfs and it's working fine. It would likely break if you didn't have git-lfs installed on the machine where you're pod install
ing.
Just had a hangup with this for a vendored library. Turned out to be that CocoaPods had cached the library before Git LFS had been enabled (with git lfs install
) on the build server.
The fix was easy, just delete the CocoaPods cache folder after enabling Git LFS, like so:
rm -rf /Users/$USER/Library/Caches/CocoaPods
Looks like as if there is nothing actionable for us to do here.
We have a requirement to use a git lfs Pod Repository without running the command git lfs install
(which modifies the global .gitconfig file and messes up another part of our pipeline). Can CocoaPods be modified to handle this? @neonichu
@marner2 you can use an .lfsconfig file at the root of the repo without the need to touch the global .gitconfig.
@phatblat can you elaborate on this? I don't see how the .lfsconfig is supposed to help. That's for configuring specific options once git-lfs is already being used. That file has no effect if git lfs install
hasn't been run and we don't have a way to call git lfs pull
before things are copied to the Pods folder.
I'm not trying to change any git-lfs
settings, I just want to make cocoapods download the git lfs files from a cold start (uncached) without modifying the global or user .gitconfig.
We'd like to know the current status on this issue. We also have a pod for installing a large framework (800+ MB) and many users have faced the same issue as OP described. It would be great if there was a way to indicate LFS in podspecs so that LFS can be automatically installed before fetching the frameworks.
Most helpful comment
Just had a hangup with this for a vendored library. Turned out to be that CocoaPods had cached the library before Git LFS had been enabled (with
git lfs install
) on the build server.The fix was easy, just delete the CocoaPods cache folder after enabling Git LFS, like so:
rm -rf /Users/$USER/Library/Caches/CocoaPods