Before punishing for contempt, unless the offender is already in the presence of the court, the offender must be served personally with an order to show cause against the punishment, and a reasonable time given the offender therefor; or the offender may be brought before the court forthwith, or on a given day, by warrant, if necessary. In either case the offender may, at the offender's option, make a written explanation of the offender's conduct under oath, which must be filed and preserved.
Iowa Code § 665.7
2010 Acts, ch 1159, §15