spotify / XCRemoteCache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Cocoapods's generate_multiple_pod_projects feature

CharlieSuP1 opened this issue · comments

Great remote cache project, and seems to work very in my Demo project, very promising!Thx a lot!

But when I try to integrate XCRemoteCache in my company's non-trivial project,I got very low cache hit rate.

After investigation, I found that cocoapods-xcremotecache plugin seems do not support Cocoapod's generate_multiple_pod_projects feature. Any cocoapods project(not target) do not have a XC** build phase.

And I looked into the code base, found there are actually efforts to support generate_multiple_pod_projects:

image

So I want to ask is there any progress in supporting generate_multiple_pod_projects? Or are PRS related with generate_multiple_pod_projects welcome?

That is fully supported, added in #57 by @vasvf (with further improvements).

I have just double-checked the sample Podfile we use in the E2E tests, and the project correctly adds [XCRC] Build phases. Sample project's target:
Screenshot 2022-07-07 at 18 46 31

Thx for reply!

I found the reason is that the feature Cocoapods' feature incremental_installation is also on. So the pod projects are not generated agin, thus no build phase inserted.

In our project
install!('cocoapods', incremental_installation: true, generate_multiple_pod_projects: true)

I am not sure whether there is any way to insert XCR build phases with incremental_installation being true.

Thx again

That happens because you generated all Pod's .xcodeprojs before integrating with XCRemoteCache and cocoapods does not generate them anymore, even it should.

I think you have 2 workarounds to force pods project regeneration:

  • pod deintegrate + pod install (maybe even rm -rf Pods is required)
  • change to install!('cocoapods', incremental_installation: false, generate_multiple_pod_projects: false) and generate a project once and then revert to the original Podfile state.

The ^ PR should fix that problem.

In the meantime, you can call pod install --clean-install if Pod's project/target misses [XCRC] integration build steps.

thx a lot