Shallow submodules are possible with git, the problem is with Xcode CI.
Using git to store large binary images is anti-pattern, so it might never be an optimal fit behaviorally. For Xcode's sake, ideally you would not use git at all for this purpose, and just script into CI that the build process retrieves a single image (for example, via a rake or gradle task, wget, curl, scp, etc.). If it is really an image target, you probably have the ability to reference it, like this jar file:
https://github.com/projecthydra/hydra-jetty/blob/master/solr/lib/solr-analysis-extras-4.9.0.jar
The CI is not interested in the availability of other possible states for the target, or the revision history. It just wants to fulfill the dependency.
If you must use submodule
, you could set up your own slimmed internal repo target called [that_submodule]_current that just has the single state you want. Blow it away and replace it as needed.
Note that Xcode apparently has a detached submodule head bug, so that suggests it will be some time before they handle other slightly more exotic submodule options like --depth
.