auto run shortcut to open PB

This commit is contained in:
leminlimez committed 2025-05-31 20:02:25 -04:00
1 parent 32da6b41c4
commit 3bad6ffe14
2 files changed
+11 -2

No files matched your search

@@ -7,6 +7,7 @@
import Foundation
import ZIPFoundation
import UIKit
class PosterBoardManager {
private static func unzipFile(at url: URL) throws -> URL {
@@ -40,6 +41,12 @@ class PosterBoardManager {
return destinationURL
}
static func runShortcut(named name: String) {
guard let urlEncodedName = name.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
let url = URL(string: "shortcuts://run-shortcut?name=\(name)") else { return }
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
static func getDescriptorsFromTendie(_ url: URL) throws -> URL? {
let unzippedDir = try unzipFile(at: url)