Tired of waiting and waiting for XCode to resolve SPM packages? Then you've come to the right place. SPM-Git-Swap parses your project folder for Package.resolved files and locally clones all dependencies. It then updates your global git config git config --global --edit and tells git to use the local repos instead of the remotes. When SPM goes to fetch dependencies it will use the local versions.
- Install Rust - https://rustup.rs/
- Run the project and point it to your iOS project folder
cargo run --release install my_ios_project_folder - Wait a while as the repositories are cloned
- SPM should now use the local versions
- SPM-Git-Swap will fetch if the repo is already cloned. If you alter your SPM dependencies you will need to run the script again to get the latest changes from each repo.
- Currently, there is no handling for weird states that may occur from killing the install half way through. You can run
cargo run --release wipeto wipe your caches. This will not update your git config so you will need to either clear that manuallygit config --edit --globalor runcargo run --release install my_ios_project_folderagain.