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.
(..) I was with you at Hardhome. We saw what's out there. We know it's coming here. How can you leave us now? I did everything I could. You know that. - You swore a vow. - Aye, I pledged my life to the Night's Watch. - I gave my life. - For all nights to come. They killed me, Edd! My own brothers. (..)2016 TvShow: Game of Thrones Title: Book of the Stranger Season: 6 Episode 4