Updated for Xcode 6