mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
* Restructure the repository * lock file * fmt * fix bench * fix cli template test * remove accidental file * fix mv command * clippy * upgrade paths-filter github action * fix cli migration tests * lockfile * license headers * clippy * scope test-core to tauri crate * license header * correct --manifest-path usage * lockfile * fix tauri-driver on macOS [skip ci] * build target ios * try downgrade env_logger * downgrade 0.1.7 * try to fix bench * bench overflow * revert overflow fix, fix tauri_root_path * revert env_logger downgrade * fmt * raise msrv to 1.71 * fmt * delete .cargo/config.toml [skip ci] --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>
21 lines
405 B
Swift
21 lines
405 B
Swift
import SwiftRs
|
|
import Tauri
|
|
import UIKit
|
|
import WebKit
|
|
|
|
class PingArgs: Decodable {
|
|
let value: String?
|
|
}
|
|
|
|
class ExamplePlugin: Plugin {
|
|
@objc public func ping(_ invoke: Invoke) throws {
|
|
let args = try invoke.parseArgs(PingArgs.self)
|
|
invoke.resolve(["value": args.value ?? ""])
|
|
}
|
|
}
|
|
|
|
@_cdecl("init_plugin_{{ plugin_name_snake_case }}")
|
|
func initPlugin() -> Plugin {
|
|
return ExamplePlugin()
|
|
}
|