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.
(..) about the Boltons. I need to get a message to her. To Sansa Stark. Who are you? Someone who swore to keep her safe. Swore to who? Her mother. Her mother's dead. That doesn't release me (..)2015 TvShow: Game of Thrones Title: Kill the Boy Season: 5 Episode 5