Aliya Summary: Joseph lived until the age of 110. Before passing away he told his brothers that G‑d would eventually take them out of Egypt and return them to the Promised Land. Joseph asked his brothers to promise that when that time arrived they would carry his remains with them, and inter him in Israel.
Yosef tells his brothers that G-d will remember them and lead them out of Egypt, and then makes them swear that G-d will remember them and lead them out of Egypt (50:24-25), and that they’ll take his remains with them when they leave. It seems that Yosef wanted to make sure that they heard and BELIEVED that they would be saved, and only swearing could convey that belief to him.