Can a spell detect the invisible?

Yep.

Let's look at an example: a grog in front of a red wall is turned invisible with VoI (ArM5 p.146).
That grog still casts a shadow and blocks light. Iconic species from the wall (HoH:S p.61) need light to be carried. There is hence no way to have light naturally pass through the grog to carry iconic species from the red wall behind to his front and turn him red. This still needs to be done by the VoI magic.

Just think of a chameleon turned red to hide before the red wall.