updated iOS sample based on latest changes