Highly sensitive and selective detection of nitrophenolic explosives by using nanospheres of a tetraphenylethylene macrocycle displaying aggregation-induced emission.