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 don't want to talk about it. I want you to know that there's not a day that goes by that I don't regret giving him those keys. He swore to me that he was sober. I don't know, I guess I was just so drunk, I believed him. But all I'm trying to say is my life has never been the same (..)2009 The Black Waters of Echo's Pond