Updated for XCode 6.1 and iOS8.1.1