add getAvailableBytes for ios only