tauri-plugin-device 1.0.0

Tauri plugin for accessing device information
Documentation
import SwiftRs
import Tauri
import UIKit
import WebKit

class PingArgs: Decodable {
  let value: String?
}

class DevicePlugin: Plugin {
  @objc public func getId(_ invoke: Invoke) throws {
        if let uuid = UIDevice.current.identifierForVendor {
            invoke.resolve([
                "identifier": uuid.uuidString
            ])
        } else {
            invoke.reject("Id not available")
        }
  }
}

@_cdecl("init_plugin_tauri_plugin_device")
func initPlugin() -> Plugin {
  return DevicePlugin()
}