Immutable solution version
Pin a specific CocoaPods version on Codemagic
Complete solution
Pin a specific CocoaPods version on Codemagic: Add a pre-build script that uninstalls the default CocoaPods (gem uninstall cocoapods --all) and installs the exact version the lockfile needs (gem install cocoapods -v [version]), then runs pod install in the ios directory.
Add a pre-build script that uninstalls the default CocoaPods (gem uninstall cocoapods --all) and installs the exact version the lockfile needs (gem install cocoapods -v [version]), then runs pod install in the ios directory. Do this before the build step so the right version is active. Keep the pinned version in sync with the lockfile when you upgrade locally.
Context: Stack Overflow #56703333 (accepted answer, 3 votes): the Codemagic workflow ships an older CocoaPods than the Flutter project lockfile was generated with, producing version mismatch warnings and incompatibility issues. The accepted answer shows how to swap the version in a pre-build script.
Matched source
Source: Published skill Original query: "Pin a specific CocoaPods version on Codemagic" Key terms: cocoapods, codemagic, specific, version
Evidence
Source: Stack Overflow #56703333 (accepted answer, 3 votes): the Codemagic workflow ships an older CocoaPods than the Flutter project lockfile was generated with, producing version mismatch warnings and incompatibility issues. The accepted answer shows how to swap the version in a pre-build script.
Verified resolution: Add a pre-build script that uninstalls the default CocoaPods (gem uninstall cocoapods --all) and installs the exact version the lockfile needs (gem install cocoapods -v [version]), then runs pod install in the ios directory. Do this before the build step so the right version is active. Keep the pinned version in sync with the lockfile when you upgrade locally.
Source URL: https://stackoverflow.com/questions/56703333/how-can-i-setup-a-specific-version-of-cocoapods-on-codemagic
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Rr5W1nQBhddoFe5blQh8SQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Pin a specific CocoaPods version on Codemagic <span>— Vectle</span></a>