mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-18 21:12:19 +02:00
feat(clipboard-manager): implement clear on iOS and Android (#1462)
This commit is contained in:
@@ -38,6 +38,12 @@ class ClipboardPlugin: Plugin {
|
||||
invoke.reject("Clipboard is empty")
|
||||
}
|
||||
}
|
||||
|
||||
@objc public func clear(_ invoke: Invoke) throws {
|
||||
let clipboard = UIPasteboard.general
|
||||
clipboard.items = []
|
||||
invoke.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
@_cdecl("init_plugin_clipboard")
|
||||
|
||||
Reference in New Issue
Block a user