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.
(..) It will take me a month... ...to make the sword. I suggest you spend it practicing. I've completed doing... ...what I swore an oath to God, years ago, ...to never do again. I have created "something that kills people." And in that purpose, was a success. I've done this because philosophically, (..)2003 Kill Bill: Vol. 1