Updated to work with Xcode 6