The only one guilty was his cheating wife.

A cuckolded hubby who used the “Find My iPhone’’ app to track down his straying spouse — and then barged into her lover’s Rockland home and filmed them naked in bed together — was cleared of burglary and spying charges Tuesday.

Sean Donis, 37, wept as Rockland County Supreme Court Justice Kevin Russo found him not guilty after about 20 minutes of deliberation at the non-jury trial.

“Just thank God it’s finally over,’’ said Donis, a florist from Clifton, NJ. “Now I can finally breathe.’’

Donis’ lawyer, Howard Greenberg, even went so far as to say his client deserved to be more than just cleared in court.

“He should get a medal for not acting out a crime of passion when he walked in on the scene he did,” Greenberg said in his closing statement.

“In the end, it’s a very simple case. … He commits trespassing that in the same jurisdiction is a violation, not a crime, and uncovered the greater evil of his wife screwing a stranger.”

The suspicious hubby used the app to track down the family’s iPad, which his wife, Nancy Donis, 38, had unwittingly taken with her to boyfriend Albert Lopez’s home in April 2016.

Sean Donis said that when he arrived at Lopez’s house, the front door was unlocked, and he went inside.

Prosecutor Nabeela McLeod asked Donis during cross-examination whether he had permission to enter Lopez’s home.

“Define permission,’’ Sean Donis said. “My wife was there. I rang the doorbell and knocked on the door. She could have been kidnapped, you never know.”

McLeod replied, “But you said you wanted to catch her. You felt you had the right.”

Donis shot back, “If my wife wasn’t there, I wouldn’t have gone in.”

He entered Lopez’s dimly lit master bedroom to find his wife and her boss naked in bed — and began filming them with his cellphone.

Lopez testified Friday that he was terrified of what Donis would do at the time. McLeod said in her closing statement that the scorned husband “wanted to embarrass, humiliate and degrade [the pair] as much as possible.’’

But in his closing statement, Greenberg offered some common-sense advice to counter that notion, saying, “You can’t be too scared of anything if you screw another guy’s wife.

“When you engage in adultery, you assume the risk and thereby consent in being exposed,’’ the lawyer argued.

He contended that his client actually “did a mitzvah’’ — a good deed — by exposing Lopez’s shenanigans with an underling. Lopez was the COO of Gotham City Orthopedics in Clifton at the time, and Nancy Donis was his billing manager.

Sean Donis had faced up to 15 years behind bars on charges of burglary and unlawful surveillance in the case.

A crew from the British public broadcasting network, the BBC, was on hand for Tuesday’s verdict as part of a larger documentary series it is making.

“His life took a ‘Me Too’ in 2016 before there was a hashtag ‘Me Too’ movement,’’ Greenberg said.

Neither Lopez nor Nancy Donis were in court Tuesday. Phone calls to numbers listed for them and their relatives either went unanswered or were immediately hung up.