Updated to work on Xcode 4.x