Xcode bot: git submodules not initialized Xcode bot: git submodules not initialized xcode xcode

Xcode bot: git submodules not initialized


On Xcode 6.1.1 and OS X Server 4.0, it looks like they fixed the submodules with detached HEAD issue, but there are still some bugs. One of my project has one its submodules being completely ignored by Xcode Server so the app fails to build:

$ git submodule 8a88bc41c9dc0f57c921d82bc4e7b93e1c4cbf7a InAppStore (heads/master) e4203f9f61d2546868c1274da5c7a0c56b87a737 Libraries (heads/master)  <--- IGNORED 01902f255e6c3d90f0db41cb62dd2934098b98dd MixpanelTracker (heads/master) e2bee59accd817d50dff881a42c9e9afe307226f XLFacility (1.4.1-5-ge2bee59)

The fix for me was to add a pre-integration script trigger as such:

cd "$XCS_SOURCE_DIR/{YOUR_APP_REPO_NAME_WITHOUT_DOT_GIT_SUFFIX}"git submodule update --init --recursive

At this point things were building although there were non-fatal warnings about the checkout not being clean or something like that. They went away when I changed to the bot's configuration to have "Cleaning" set to "Always".


In Xcode 9 server, submodules are not initialized if none of the files of the submodules is referenced by one of the Xcode projects in the workspace.

This may happen, for instance, when you include a header file from a submodule that is not part of your code and therefore you added it to the "headers search paths" (c/c++) instead of adding it to the project.

A possible workaround is to add at least one file from the submodule to the Xcode project. It can even be a Readme.md file.This is easier than checking out submodules using a custom script because it relies on Xcode Server to store your GIT credentials.


Is I understand its a bug.I had the same problems and found that there is an issue with detached submodules.See the next article that show how to fix this issue (doesn't help on public repository) http://ikennd.ac/blog/2013/10/xcode-bots-common-problems-and-workarounds/

Hope this helps you.