Updated the iOS specific code to Swift Beta 5