fixed iOS compilation for device