add swift code