How to Integrate CocoaPods

Question or problem

I’m working on a large-scale iOS project that includes multiple modules and relies heavily on CocoaPods. Due to some dependencies not supporting Swift Package Manager, migrating all Pods to SPM is not an option for me. I want to integrate Tuist for project generation and management, but still continue using CocoaPods for dependency management.

How can I properly integrate CocoaPods within a Tuist-managed project? Is there an official or recommended way to keep using Pods while leveraging Tuist for modularization and project configuration?

Expectation

I’d expect Tuist to provide a way to support hybrid setups — where the project structure is handled by Tuist, but dependency resolution is still done via CocoaPods. I’d also like to know if there’s any best practice or workaround the community suggests in such cases.

Hey!

Yes, you can keep using CocoaPods even if you generate your projects with Tuist. You do need to run pod install after tuist generate, though.

I would recommend wrapping tuist in a script to do the following automatically:

# generate.sh
#!/usr/bin/env bash

tuist generate --no-open
pod install

Note that in this scenario, Tuist is not aware of the part of the graph defined by CocoaPods, so Tuist can’t for example lint that part of the graph or cache it.

Since CocoaPods is being deprecated, I’d suggest looking into moving over to SwiftPM now – if you have vendors that only support integrating their modules via CocoaPods, you should push them away from this model. Additionally, CocoaPods is already read-only.