It depends on who and what I'm writing. The narrator in my urban fantasies doesn't swear (not sure if that's 100% true, but close) but will quote others swearing. Since the general tone of the books is distinctly vulgar a bit of swearing ought to disappear into the background.
My current WIP, which is technically sci-fi, has four main characters in 1st person, and one swears, extensively, and even refers to himself as "potty-mouth". However, in the bit that I've just finished the first draft of, he is working undercover and has a doodad in his head to maintain his cover story and block his swearing which would otherwise be utterly inappropriate in the circumstances. As a result, he still swears in the narrative to the reader, but not in direct quotes of his own speech where he has a stuttering speech impediment.
Perhaps I could write him without the swearing, but he is a foul-mouthed, foul-tempered ******* and I suspect I would then lose the contrast with one of the other characters who his "prim and prissy" verbal nemesis. Overall, I don't think it would be credible to tone him down to a "gosh darn it" when he has a life that is a continuous sequence of set-backs akin to hitting himself on the finger with a hammer
twice, again and again...**
As a final thought, writing a character who almost lives in a permanent state of boiling frustration and fury, with full-blown profanity, is tremendously cathartic.
@Wayne Mack makes an interesting point
One of the lessons I learned in my childhood was that the use of profanity was inarticulate expression
and there are places where I've given a character profanity laden dialogue because he is seriously inarticulate, and certainly not a nice lad. I could just try to describe him and an uncouth and inarticulate chap, but I don't think that would really cut it. (In contrast, I have worked with a few people over the years who could deliver outstandingly articulate profanity.)
As with so many writing issues, it depends on the story, the character, the intended readership and how you want to write it.
** I have hit myself on the finger with a hammer. Gosh darn it certainly didn't cover the situation.