Created
October 8, 2018 23:49
-
-
Save russell-archer/b2959134101b0e35f613587403de773c to your computer and use it in GitHub Desktop.
ShowRandomColor. Handle the intent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// IntentHandler.swift | |
// ColorIntent | |
// | |
// Created by Russell Archer on 05/10/2018. | |
// Copyright © 2018 Russell Archer. All rights reserved. | |
// | |
import Intents | |
class IntentHandler: INExtension { | |
override func handler(for intent: INIntent) -> Any { | |
guard intent is ShowRandomColorIntent else { | |
fatalError("Can't handle intent \(intent)") | |
} | |
return ColorIntentHandler() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment