I was interested in this because it happened the last time I returned to NZ, but I hadn't seen it before. There are several approved methods and it depends on the airline. The method that doesn't involve spraying with you onboard is more expensive so tends to be used by budget airlines, and also airlines who might rotate their planes and crew around routes more often because it is a treatment that lasts for weeks.