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.
(..) We're not schemers. We don't stab our rivals in the back or cut their throats at weddings. I swore an oath to House Tyrell. You swore an oath to the crown as well, Lord Tarly. I've known Olenna since I was a child. (..)2017 TvShow: Game of Thrones Title: Stormborn Season: 7 Episode 2