A cationic iridium(III) complex with aggregation-induced emission (AIE) properties for highly selective detection of explosives.