add swift sample code