From e50d50f177fcaa6339e4cb3ff9d96ee3af02d94c Mon Sep 17 00:00:00 2001 From: fufesou Date: Fri, 19 May 2023 12:57:03 +0800 Subject: [PATCH] try fix build ios Signed-off-by: fufesou --- src/client/io_loop.rs | 1 + src/flutter_ffi.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/client/io_loop.rs b/src/client/io_loop.rs index 597c720ab..368ea18e5 100644 --- a/src/client/io_loop.rs +++ b/src/client/io_loop.rs @@ -18,6 +18,7 @@ use hbb_common::protobuf::Message as _; use hbb_common::rendezvous_proto::ConnType; #[cfg(not(any(target_os = "android", target_os = "ios")))] use hbb_common::sleep; +#[cfg(not(target_os = "ios"))] use hbb_common::tokio::sync::mpsc::error::TryRecvError; #[cfg(windows)] use hbb_common::tokio::sync::Mutex as TokioMutex; diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index d072c58a3..7d8cb5081 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -881,6 +881,7 @@ pub fn main_handle_relay_id(id: String) -> String { } pub fn main_get_current_display() -> SyncReturn { + #[cfg(not(target_os = "ios"))] let display_info = match crate::video_service::get_current_display() { Ok((_, _, display)) => serde_json::to_string(&HashMap::from([ ("w", display.width()), @@ -889,6 +890,8 @@ pub fn main_get_current_display() -> SyncReturn { .unwrap_or_default(), Err(..) => "".to_string(), }; + #[cfg(target_os = "ios")] + let display_info = "".to_owned(); SyncReturn(display_info) }