The situation: You’re starting tests, and you get a result like this:
No update of the test result indicators — just black diamonds.
Well, I tried several searches, without a result. Nothing helped. The diamonds remained black.
Then, I remembered a similar problem long time ago with a different codebase (the above appeared with a new project I set up).
And I got a clue what was happening.
(Drum roll here.)
When I’m setting up a new project, one of the first steps is to add a build phase for the versioning:
if [ $ENABLE_PREVIEWS = NO ]; then
xcrun agvtool next-version -all
Should this be the reason? When commenting out these lines, the testing works as expected:
So, obviously, this build phase is the reason for the Xcode misbehaviour. But where to put the versioning instead?
The answer: The scheme. Add the code to the “Build” step, and you have both working properly: versioning and testing.
If you can explain the reason for this behaviour — let me please know and comment this article.