Adapted to XCode 6.1.1