mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-21 09:41:34 +03:00
8a1ae2deaf
* wip * add option to use xcode project * configuration * clear env * add change file * remove xcuserdatad * delete xcuserstate
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()
|
|
}
|