add the swift version for GenerateRendererSample