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.
(..) - Why? Our date. What date? - The date that you agreed to. - No... Yes, you did. You promised and you swore it. Well, I guess I changed my mind. Look, I know you get some dirty guy coming up to you on the street... (..)2004 The Notebook