To swear in the church
Solution 1:
The one that springs most quickly to mind is to blaspheme, or to be blasphemous: to speak irreverantly about God or sacred things. Blasphemy is commonly understood to include behaving inappropriately in a church but is also used colloquially (and jokily) for many other things outside a religious context. For example: I might say that Team A were far better than Team B and I might be told that my view was blasphemous.