Xcode can't automatically checkout git submodule?? Neither work on Xcode server!!

Hi all, my codebase was one git with another submodule framework who has a lot dependency git submodules.


Everything works fine when i using sourcetree app.


But if I trying to purely use Xcode to checkout the code, it only checkout what it has, never touch the submodule.

Even I trying to manully download the submodule, it fails due authenticate reason. But I don't get it, it's same git from my company, sharing same access, how come it can work on main git but won't work on submodule git?


This neither work on Xcode bot, my server just failed to start compile, cuz submodule code are missing.



Please help.

Replies

I also blocked with this issue on my project. After googling for 2 days I realized this issue was from Xcode 5, was fixed (or maybe not) in Xcode 6 and now it's apeared again: https://github.com/lionheart/openradar-mirror/issues/8030


I'm calling someone from the Support team in this thread to find a workaround.

We had a similar problem our solution was to create a script that did the checkout of the sub-module and run that as a pre-integration trigger for the bot. Just a two liner:

git submodule init

git submodule update


One thing we also ended up doing was creating a read-only user in git that the submodule uses to checkout. You may not need that last step.

  • Thanks, was missing the init to update submodule :)

Add a Comment

We just have bumped into the very same problem (submodules not cloned automatically) with Xcode 11.1 (11A1027).


The only work-around we eventually found was to go Terminal and use an explicit

git submodule update --init --recursive


Is it possible such a howler still was not fixed in Xcode, not even after three years? Or do we do some mistake at our side, for this should work all right and does for others? Thanks!

Post not yet marked as solved Up vote reply of OCS1 Down vote reply of OCS1