Fixed ios specs to give out proper error codes