Answer: Updating CocoaPods build phase ordering after pod install
#2817
Unanswered
maxheld
asked this question in
Troubleshooting & how to
Replies: 1 comment
-
Hello @maxheld and everyone, Just add this empty pre-script in And after This is my full troubleshooting over it: #5989. Please check it out |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
@pietrocaselani and I needed to update the order of the build phases after pod install was run. We are currently migrating our project to support Tuist and ran in to a problem when migrating one specific project. After generating the project with
Tuist
and runningpod install
we realised that the generated[CP] Embed Pods Frameworks
build-phase in our Tests target was appended to the very end, which caused a build error. This was because it was carried out after a phase that depended on it. The following is a ruby function for the Podfile to update the ordering of the build phases after everything is configured by CocoaPods.This utilises the
post_integrate
phase of CocoaPods. It is important that you do this in thepost_integrate
and not thepost_install
since there not all changes have been saved to disk.This might not be the best ruby code and feel free to tweak it to suit your needs. We chose the index 3 but you can probably do something more fancy by inserting before a specific phase.
We hope it helps!
Thanks to @pepibumur for the idea to use Pod hooks!
Beta Was this translation helpful? Give feedback.
All reactions