Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions src-tauri/src/ios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
// the same approach as Capacitor's hideFormAccessoryBar.

use std::ffi::CString;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
use std::sync::OnceLock;
use std::time::Duration;

use objc2::rc::{Allocated, Retained};
use objc2::runtime::{
AnyClass, AnyObject, ClassBuilder, NSObject, NSObjectProtocol, ProtocolObject, Sel,
};
use objc2::{define_class, msg_send, sel, AnyThread, ClassType};
use objc2::{define_class, msg_send, sel, AnyThread};
use objc2_avf_audio::AVAudioSession;
use objc2_call_kit::{
CXCallController, CXCallUpdate, CXEndCallAction, CXHandle, CXHandleType, CXProvider,
CXProviderConfiguration, CXProviderDelegate, CXStartCallAction, CXTransaction,
CXCallController, CXEndCallAction, CXHandle, CXHandleType, CXProvider, CXProviderConfiguration,
CXProviderDelegate, CXStartCallAction,
};
use objc2_foundation::{NSString, NSUUID};
use tauri::webview::WebviewWindow;
Expand Down Expand Up @@ -207,11 +207,6 @@ mod callkit {
let allocated = CXStartCallAction::alloc();
CXStartCallAction::initWithCallUUID_handle(allocated, &uuid, &handle)
};
let transaction = unsafe {
let allocated = CXTransaction::alloc();
CXTransaction::initWithAction(allocated, &action)
};

let completion: RcBlock<dyn Fn(*mut objc2_foundation::NSError)> =
RcBlock::new(move |_error: *mut objc2_foundation::NSError| {});
unsafe {
Expand Down Expand Up @@ -398,7 +393,6 @@ pub(crate) fn play_notification_sound(kind: String) -> Result<(), String> {
extern "C" {}

use std::ffi::OsStr;
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::Mutex;

use block2::RcBlock;
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,12 +519,12 @@ pub fn run() {
return;
};

app.run(|app, event| {
app.run(|_app, _event| {
#[cfg(desktop)]
desktop::tray::handle_run_event(app, event);
desktop::tray::handle_run_event(_app, _event);

#[cfg(not(any(desktop, mobile)))]
let _ = (app, event);
let _ = (_app, _event);
});
}

Expand Down
Loading