Meaning of “swear” - Learner’s Dictionary

swear

verb uk us /sweər/ (past tense swore, past participle sworn)
BAD LANGUAGE [ I ]

B2 to use language that people think is rude or offensive:

He was sent home because he swore at the teacher.
She swore loudly and threw the box on the floor.
PROMISE [ I, T ]

B2 to make a serious promise:

[ + to do sth ] I swear to tell the truth.
[ + (that) ] She swore that she was at home at the time of the accident.
TRUE [ T ]

used to say that you are sure something is true:

[ + (that) ] I could have sworn that she said she lived in Canterbury (= I was sure she lived in Canterbury, but now I have found that it is not true).

(Definition of “swear” from the Cambridge Learner’s Dictionary © Cambridge University Press)