Updated for iOS8 and Xcode6 Beta 6