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.
(..) Not Dany. How about "My Queen"? I'd... bend the knee but... What about those who swore allegiance to you? They'll all come to see you for what you are. I hope I deserve it. You do. You should get some rest. (..)2017 TvShow: Game of Thrones Title: Beyond the Wall Season: 7 Episode 6