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.
(..) And he'd killed one of them with his bare hands. Heatholaf? - That's it, yes, aye. I paid the blood-debt for your father, and he swore his oath to me. So, I saved his skin, and you are yet to save ours, eh? All hail the great Beowulf! Come to save our pathetic Danish skins, eh? (..)2007 Beowulf
(..) I wanna a kiss. Give me a kiss. I wanna kiss you. - Stop it! My fays, my beautiful fays. One year ago, I, Hrothgar your king, swore that we would celebrate our victories in a new hall. Mighty and beautifull. Why not? And in this hall we shall divide the spoils of our conquest, (..)2007 Beowulf