Implement Siri shortcut to sync repository per automation task
This commit is contained in:
parent
21b5774cc5
commit
b3bde9e0e0
12 changed files with 499 additions and 4 deletions
20
passShortcuts/IntentHandler.swift
Normal file
20
passShortcuts/IntentHandler.swift
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//
|
||||
// IntentHandler.swift
|
||||
// passShortcuts
|
||||
//
|
||||
// Created by Danny Moesch on 03.03.20.
|
||||
// Copyright © 2020 Bob Sun. All rights reserved.
|
||||
//
|
||||
|
||||
import Intents
|
||||
import passKit
|
||||
|
||||
class IntentHandler: INExtension {
|
||||
|
||||
override func handler(for intent: INIntent) -> Any {
|
||||
guard intent is SyncRepositoryIntent else {
|
||||
fatalError("Unhandled intent type \(intent).")
|
||||
}
|
||||
return SyncRepositoryIntentHandler()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue