How do you attach a swing to a porch?

How do you attach a swing to a porch?

https://www.youtube.com/watch?v=t4kyC3SaaqE

How do you make a porch swing at home?

https://www.youtube.com/watch?v=Mx3cIMsva4g