They 'swore' (an oath of) allegiance to the United States of America. [=they formally promised that they would be loyal to the United States of America]
He 'swore us to secrecy/silence'. [=he made us promise not to tell anyone his secret]
He was so disgusted by the election results that he 'swore off' politics for good.
(..) No. It is DOCTOR Strange. Not Master Strange, not Mister Strange, Doctor Strange. When I became a Doctor, I swore an oath to do no harm. And I have just killed a man! I'm not doing that again. I became a Doctor to save lives not take them. You become a Doctor to save (..)2016 Doctor Strange