Added first stab at Swift constraints. Not fully tested and I'm still learning the language. Apologies.