EasyTier/tauri-plugin-vpnservice/ios/Sources/ExamplePlugin.swift
Sijie.Sun 858ade2eee
Android Support (#166)
1. Add vpnservice tauri plugin for android.
2. add workflow for android.
3. Easytier Core support android, allow set tun fd.
2024-07-15 00:03:55 +08:00

21 lines
387 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_vpnservice")
func initPlugin() -> Plugin {
return ExamplePlugin()
}