feature/extend-tauri-generated-xcode-project-for-tvos-target
rs 28 lines 867 Bytes
Raw
1 use serde::de::DeserializeOwned;
2 use tauri::{plugin::PluginApi, AppHandle, Runtime};
3
4 use crate::models::*;
5
6 pub fn init<R: Runtime, C: DeserializeOwned>(
7 app: &AppHandle<R>,
8 _api: PluginApi<R, C>,
9 ) -> crate::Result<TauriPluginIosWindow<R>> {
10 Ok(TauriPluginIosWindow(app.clone()))
11 }
12
13 /// Access to the tauri-plugin-ios-window APIs.
14 pub struct TauriPluginIosWindow<R: Runtime>(AppHandle<R>);
15
16 impl<R: Runtime> TauriPluginIosWindow<R> {
17 pub fn open(&self, payload: OpenRequest) -> crate::Result<()> {
18 // Desktop implementation - no-op since this is iOS-specific
19 println!("Opening window with URL: {}", payload.url);
20 Ok(())
21 }
22
23 pub fn close(&self) -> crate::Result<()> {
24 // Desktop implementation - no-op since this is iOS-specific
25 println!("Closing iOS window (no-op on desktop)");
26 Ok(())
27 }
28 }