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.
(..) North was Torrhen Stark, who bent the knee to my ancestor, Aegon Targaryen. In exchange for his life and the lives of the Northmen, Torrhen Stark swore fealty to House Targaryen in perpetuity. Or do I have my facts wrong? I wasn't there, Your Grace. No, of course not. But still, an oath is an oath. (..)2017 TvShow: Game of Thrones Title: The Queen's Justice Season: 7 Episode 3