2023-02-15 17:42:47 +03:00
|
|
|
import UIKit
|
2023-02-11 16:30:44 +03:00
|
|
|
import WebKit
|
|
|
|
import Tauri
|
2023-03-18 16:57:05 +03:00
|
|
|
import SwiftRs
|
2023-02-11 16:30:44 +03:00
|
|
|
|
2023-02-15 03:36:44 +03:00
|
|
|
class ExamplePlugin: Plugin {
|
2023-02-11 16:30:44 +03:00
|
|
|
@objc public func ping(_ invoke: Invoke) throws {
|
|
|
|
let value = invoke.getString("value")
|
2023-02-15 17:42:47 +03:00
|
|
|
invoke.resolve(["value": value as Any])
|
2023-02-11 16:30:44 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@_cdecl("init_plugin_{{ plugin_name_snake_case }}")
|
2023-04-23 15:15:13 +03:00
|
|
|
func initPlugin() -> Plugin {
|
|
|
|
return ExamplePlugin()
|
2023-02-11 16:30:44 +03:00
|
|
|
}
|