There are multiple definitions - click on the translation that matches your context.

宣誓

动词

full

swear

verb

Definitions of swear

to take an oath (=a promise that a person will tell the truth) or vow (=a solemn promise)

I, Denzel Hayes, do solemnly swear that I will bear true faith and allegiance to the United States of America and the State of Washington.

to officiate when another person takes an oath

At the start of a trial the usher announces the entrance and exit of the judge, and swears in the witnesses.

to curse or use offensive language

Jackson began shouting and swearing and was arrested when she would not calm down.