Making the code compile in Xcode 6.0.1