Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update swift package using command line?

We are integrating Github Actions to our project which uses Swift Package Manager. We want to update those swift packages from the CICD. We have tried using commands like xcodebuild -resolvePackageDependencies and xcodebuild -resolvePackageDependencies -project myproject.xcodeproj -scheme my scheme

But these commands are not working. Can someone please help on how to update the swift packages either from terminal command line or GitHub Actions?

like image 771
Aishwarya Lakshmi Avatar asked Oct 29 '25 07:10

Aishwarya Lakshmi


2 Answers

Without error logs its hard to help, but the command xcodebuild -resolvePackageDependencies should work, just make sure you ran it on root directory.

like image 98
Amit Nadir Avatar answered Nov 01 '25 12:11

Amit Nadir


As a workaround, for CI, you can specify the minimum version number on Project -> Package Dependencies. Seems working correctly for me. ✌🏻

enjoy

like image 26
dklt Avatar answered Nov 01 '25 12:11

dklt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!