Does the violation have to occur in front of a police officer to count as a violation?
No. A police officer may make a warrantless arrest of a personal protection order (PPO) respondent if the officer has "reasonable cause" to believe that he violated the PPO.
Always carry a copy of your PPO! A Police Officer can then quickly confirm the terms of your order when investigating your report that the respondent has committed a violation.