update ios sample to the new interface