fix: ios build

This commit is contained in:
Kingtous
2023-04-17 19:26:39 +08:00
parent f56fc6fdb0
commit 83e63d57e1
16 changed files with 171 additions and 96 deletions

View File

@@ -782,6 +782,7 @@ pub fn make_fd_to_json(id: i32, path: String, entries: &Vec<FileEntry>) -> Strin
/// 1. Try to send the url scheme from ipc.
/// 2. If failed to send the url scheme, we open a new main window to handle this url scheme.
pub fn handle_url_scheme(url: String) {
#[cfg(not(target_os = "ios"))]
if let Err(err) = crate::ipc::send_url_scheme(url.clone()) {
log::debug!("Send the url to the existing flutter process failed, {}. Let's open a new program to handle this.", err);
let _ = crate::run_me(vec![url]);
@@ -801,6 +802,9 @@ pub fn decode64<T: AsRef<[u8]>>(input: T) -> Result<Vec<u8>, base64::DecodeError
}
pub async fn get_key(sync: bool) -> String {
#[cfg(target_os = "ios")]
let mut key = Config::get_option("key");
#[cfg(not(target_os = "ios"))]
let mut key = if sync {
Config::get_option("key")
} else {