I see you're already using the new UIAlertController -- good idea, since there's little use in old API if you're usung Swift anyway. But alert.textFieldAtIndex: won't work for that; it's for UIAlertView only.
Luckily, UIAlertController has a method for adding text fields.