An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
fix: build ios (#8709)
fufesoue2a7e38a3973
diff --git a/src/client/io_loop.rs b/src/client/io_loop.rsindex 27ecc7a91..1280fb801 100644--- a/src/client/io_loop.rs+++ b/src/client/io_loop.rs@@ -390,15 +390,15 @@ impl<T: InvokeUiSession> Remote<T> {if self.handler.is_file_transfer() || self.handler.is_port_forward() {return None;}- // NOTE:- // The client server and --server both use the same sound input device.- // It's better to distinguish the server side and client side.- // But it' not necessary for now, because it's not a common case.- // And it is immediately known when the input device is changed.- crate::audio_service::set_voice_call_input_device(get_default_sound_input(), false);// iOS does not have this server.#[cfg(not(any(target_os = "ios")))]{+ // NOTE:+ // The client server and --server both use the same sound input device.+ // It's better to distinguish the server side and client side.+ // But it' not necessary for now, because it's not a common case.+ // And it is immediately known when the input device is changed.+ crate::audio_service::set_voice_call_input_device(get_default_sound_input(), false);// Create a channel to receive error or closed messagelet (tx, rx) = std::sync::mpsc::channel();let (tx_audio_data, mut rx_audio_data) =diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rsindex 3eccfc84d..a7eda9d9b 100644--- a/src/flutter_ffi.rs+++ b/src/flutter_ffi.rs@@ -1319,16 +1319,18 @@ pub fn cm_close_voice_call(id: i32) {crate::ui_cm_interface::close_voice_call(id);}-pub fn set_voice_call_input_device(is_cm: bool, device: String) {- if is_cm {- let _ = crate::ipc::set_config("voice-call-input", device);+pub fn set_voice_call_input_device(_is_cm: bool, _device: String) {+ #[cfg(not(any(target_os = "android", target_os = "ios")))]+ if _is_cm {+ let _ = crate::ipc::set_config("voice-call-input", _device);} else {- crate::audio_service::set_voice_call_input_device(Some(device), true);+ crate::audio_service::set_voice_call_input_device(Some(_device), true);}}-pub fn get_voice_call_input_device(is_cm: bool) -> String {- if is_cm {+pub fn get_voice_call_input_device(_is_cm: bool) -> String {+ #[cfg(not(any(target_os = "android", target_os = "ios")))]+ if _is_cm {match crate::ipc::get_config("voice-call-input") {Ok(Some(device)) => device,_ => "".to_owned(),@@ -1336,6 +1338,8 @@ pub fn get_voice_call_input_device(is_cm: bool) -> String {} else {crate::audio_service::get_voice_call_input_device().unwrap_or_default()}+ #[cfg(any(target_os = "android", target_os = "ios"))]+ "".to_owned()}pub fn main_get_last_remote_id() -> String {diff --git a/src/server/audio_service.rs b/src/server/audio_service.rsindex 504c09279..b717c6644 100644--- a/src/server/audio_service.rs+++ b/src/server/audio_service.rs@@ -163,7 +163,6 @@ mod cpal_impl {}fn run_restart(sp: EmptyExtraFieldService, state: &mut State) -> ResultType<()> {- println!("REMOVE ME ========================= run_restart");state.reset();sp.snapshot(|_sps: ServiceSwap<_>| Ok(()))?;match &state.stream {