add auto spread function to support ios