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.
(..) My Lord! Begin! I thought you want to do it. Isn't it, Helena? You want to destroy it? Another swore to destroy it, many years ago. A strange boy with a strange name. Tom Riddle. But he lied. He's lied to many people. (..)2011 Harry Potter and the Deathly Hallows: Part 2