Preheat the air fryer to 400° (if required for your machine).
Line the bottom of the air fryer basket with foil if the holes in the basket are big enough for the kernels to fall through.
Spread the kernels in an even layer over the top of the foil and spray with nonstick cooking spray.
When the air fryer is heated, place the basket in and cook for 6 to 8 minutes, until the popping sounds have almost stopped.
Remove the basket slightly and toss two or three times during the cook time to keep the popcorn from burning.
Notes
I highly recommend you supervise the air fryer during the cooking time to make sure popcorn kernels do not get stuck in the heating element of your air fryer.