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.
(..) Dad? I thought you were... No. I'm alive in you, Harry. Now i's your turn. You swore to make Spider-Man pay. Now make him pay. But Pete's my best friend. And I'm your father. You're weak. You were always weak. You'll always (..)2004 Spider-Man 2