maj ios. Add onConnectError. Fix bug with null channel.