Unverified Commit f16448fe authored by Zach Knox's avatar Zach Knox
Browse files

SIRI SHORTCUTS!!!!!!!

Still needs some work, but I'm shocked that I got this running properly first try!
parent 9e724105
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper" "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper+Realm" "${PODS_CONFIGURATION_BUILD_DIR}/Realm" "${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper+Realm/ObjectMapper_Realm.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper/ObjectMapper.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Realm/Realm.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift/RealmSwift.framework/Headers"
OTHER_LDFLAGS = $(inherited) -ObjC -framework "ObjectMapper" -framework "ObjectMapper_Realm" -framework "Realm" -framework "RealmSwift"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper" "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper+Realm" "${PODS_CONFIGURATION_BUILD_DIR}/Realm" "${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper+Realm/ObjectMapper_Realm.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper/ObjectMapper.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Realm/Realm.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift/RealmSwift.framework/Headers"
OTHER_LDFLAGS = $(inherited) -ObjC -framework "ObjectMapper" -framework "ObjectMapper_Realm" -framework "Realm" -framework "RealmSwift"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
framework module Pods_ShortcutsExtensionUI {
umbrella header "Pods-ShortcutsExtensionUI-umbrella.h"
export *
module * { export * }
}
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper" "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper+Realm" "${PODS_CONFIGURATION_BUILD_DIR}/Realm" "${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper+Realm/ObjectMapper_Realm.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ObjectMapper/ObjectMapper.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Realm/Realm.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/RealmSwift/RealmSwift.framework/Headers"
OTHER_LDFLAGS = $(inherited) -ObjC -framework "ObjectMapper" -framework "ObjectMapper_Realm" -framework "Realm" -framework "RealmSwift"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>ShortcutsExtension</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>IntentsRestrictedWhileLocked</key>
<array/>
<key>IntentsRestrictedWhileProtectedDataUnavailable</key>
<array/>
<key>IntentsSupported</key>
<array>
<string>WOPViewFacilityIntent</string>
</array>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.intents-service</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).IntentHandler</string>
</dict>
</dict>
</plist>
//
// IntentHandler.swift
// ShortcutsExtension
//
// Created by Zach Knox on 10/3/18.
// Copyright © 2018 SRCT. All rights reserved.
//
import Intents
import WhatsOpenKit
class IntentHandler: INExtension {
override func handler(for intent: INIntent) -> Any {
guard intent is WOPViewFacilityIntent else {
fatalError("Unhandled intent type: \(intent)")
}
return WOPViewFacilityIntentHandler()
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.edu.gmu.srct.whatsopen</string>
</array>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ObA-dk-sSI">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Intent View Controller-->
<scene sceneID="7MM-of-jgj">
<objects>
<viewController id="ObA-dk-sSI" customClass="IntentViewController" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="zMn-AG-sqS">
<rect key="frame" x="0.0" y="0.0" width="320" height="150"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="4PN-XC-lEE"/>
</view>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="320" height="150"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>ShortcutsExtensionUI</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>IntentsSupported</key>
<array>
<string>INSendMessageIntent</string>
<string>WOPViewFacilityIntent</string>
</array>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.intents-ui-service</string>
</dict>
</dict>
</plist>
//
// IntentViewController.swift
// ShortcutsExtensionUI
//
// Created by Zach Knox on 10/3/18.
// Copyright © 2018 SRCT. All rights reserved.
//
import IntentsUI
import WhatsOpenKit
import RealmSwift
// As an example, this extension's Info.plist has been configured to handle interactions for INSendMessageIntent.
// You will want to replace this or add other intents as appropriate.
// The intents whose interactions you wish to handle must be declared in the extension's Info.plist.
// You can test this example integration by saying things to Siri like:
// "Send a message using <myApp>"
class IntentViewController: UIViewController, INUIHostedViewControlling {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
// MARK: - INUIHostedViewControlling
// Prepare your view controller for the interaction to handle.
func configureView(for parameters: Set<INParameter>, of interaction: INInteraction, interactiveBehavior: INUIInteractiveBehavior, context: INUIHostedViewContext, completion: @escaping (Bool, Set<INParameter>, CGSize) -> Void) {
// Do configuration here, including preparing views and calculating a desired size for presentation.
let facilityIntent = interaction.intent as? WOPViewFacilityIntent
if facilityIntent != nil {
if interaction.intentHandlingStatus != .failure {
let realm = try! Realm(configuration: WOPDatabaseController.getConfig())
let results = realm.objects(WOPFacilitiesModel.self)
if results.count > 0 {
let model = results[0]
let facilities = model.facilities
let found = facilities.filter({(facility: WOPFacility) -> Bool in
return facility.facilityName == (facilityIntent!.facility?.identifier ?? "")
})
if found.count > 0 {
let facility = found.first
let storyboard = UIStoryboard(name: "WOPSharedUI", bundle: Bundle(for: WOPFacilityDetailViewController.self))
let detailVC = storyboard.instantiateViewController(withIdentifier: "detailView") as! WOPFacilityDetailViewController
detailVC.facility = facility
attachChild(detailVC)
completion(true, parameters, self.desiredSize)
} else {
completion(false, parameters, .zero)
}
} else {
completion(false, parameters, .zero)
}
}
completion(false, parameters, .zero)
} else {
completion(false, parameters, .zero)
}
}
var desiredSize: CGSize {
return self.extensionContext!.hostedViewMaximumAllowedSize
}
private func attachChild(_ viewController: UIViewController) {
addChild(viewController)
if let subview = viewController.view {
view.addSubview(subview)
subview.translatesAutoresizingMaskIntoConstraints = false
// Set the child controller's view to be the exact same size as the parent controller's view.
subview.widthAnchor.constraint(equalTo: view.widthAnchor).isActive = true
subview.heightAnchor.constraint(equalTo: view.heightAnchor).isActive = true
subview.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
subview.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
}
viewController.didMove(toParent: self)
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.edu.gmu.srct.whatsopen</string>
</array>
</dict>
</plist>
......@@ -7,6 +7,8 @@
<string>applinks:whatsopen.gmu.io</string>
<string>applinks:whatsopen.gmu.edu</string>
</array>
<key>com.apple.developer.siri</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>group.edu.gmu.srct.whatsopen</string>
......
......@@ -734,7 +734,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mbm-hc-vWv">
<rect key="frame" x="16" y="596" width="343" height="51"/>
<rect key="frame" x="16" y="596" width="275" height="51"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="51" id="0LG-d5-1dD"/>
......@@ -779,19 +779,36 @@
<action selector="shareFacility:" destination="NAf-lT-JCD" eventType="touchUpInside" id="mdd-wn-v6b"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uBr-jZ-W8U" userLabel="Siri Button">
<rect key="frame" x="299" y="596" width="60" height="51"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="TDB-m2-H2C"/>
<constraint firstAttribute="height" constant="51" id="kvz-hJ-x9x"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="19"/>
<state key="normal" title="Siri">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="addToSiri:" destination="NAf-lT-JCD" eventType="touchUpInside" id="am3-3Y-AGJ"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Rd0-fz-V4r" firstAttribute="top" secondItem="1VL-kk-arL" secondAttribute="bottom" constant="8" id="1wo-Gz-1kd"/>
<constraint firstItem="tPh-uh-8zb" firstAttribute="baseline" secondItem="Rd0-fz-V4r" secondAttribute="firstBaseline" id="94e-aV-Mjr"/>
<constraint firstItem="1VL-kk-arL" firstAttribute="leading" secondItem="fo3-mS-Mxq" secondAttribute="leading" id="KPT-Uu-PmZ"/>
<constraint firstItem="Mbm-hc-vWv" firstAttribute="centerX" secondItem="fo3-mS-Mxq" secondAttribute="centerX" id="KcF-YS-Tws"/>
<constraint firstItem="Mbm-hc-vWv" firstAttribute="centerX" secondItem="fo3-mS-Mxq" secondAttribute="centerX" constant="-34" id="KcF-YS-Tws"/>
<constraint firstItem="tPh-uh-8zb" firstAttribute="top" secondItem="1VL-kk-arL" secondAttribute="bottom" constant="8" symbolic="YES" id="QfV-0N-meh"/>
<constraint firstItem="fo3-mS-Mxq" firstAttribute="trailing" secondItem="1VL-kk-arL" secondAttribute="trailing" id="ZlT-eF-6pp"/>
<constraint firstItem="Mbm-hc-vWv" firstAttribute="top" secondItem="Rd0-fz-V4r" secondAttribute="bottom" constant="8" id="bu2-dc-0M3"/>
<constraint firstItem="uBr-jZ-W8U" firstAttribute="baseline" secondItem="Mbm-hc-vWv" secondAttribute="baseline" id="iuv-u1-9sA"/>
<constraint firstItem="fo3-mS-Mxq" firstAttribute="bottom" secondItem="Mbm-hc-vWv" secondAttribute="bottom" constant="20" id="kWd-aJ-Tk2"/>
<constraint firstItem="tPh-uh-8zb" firstAttribute="trailing" secondItem="Mbm-hc-vWv" secondAttribute="trailing" id="ne6-b2-0Of"/>
<constraint firstItem="fo3-mS-Mxq" firstAttribute="trailing" secondItem="Mbm-hc-vWv" secondAttribute="trailing" constant="16" id="qvu-Jk-9lw"/>
<constraint firstItem="tPh-uh-8zb" firstAttribute="trailing" secondItem="Mbm-hc-vWv" secondAttribute="trailing" constant="68" id="ne6-b2-0Of"/>
<constraint firstItem="uBr-jZ-W8U" firstAttribute="leading" secondItem="tPh-uh-8zb" secondAttribute="leading" id="ov1-gk-biP"/>
<constraint firstItem="fo3-mS-Mxq" firstAttribute="trailing" secondItem="Mbm-hc-vWv" secondAttribute="trailing" constant="84" id="qvu-Jk-9lw"/>
<constraint firstItem="1VL-kk-arL" firstAttribute="top" secondItem="fo3-mS-Mxq" secondAttribute="top" id="sH0-Pb-3f8"/>
<constraint firstItem="tPh-uh-8zb" firstAttribute="top" secondItem="1VL-kk-arL" secondAttribute="bottom" constant="8" id="scv-dq-6Ri"/>
<constraint firstItem="tPh-uh-8zb" firstAttribute="leading" secondItem="Rd0-fz-V4r" secondAttribute="trailing" constant="8" symbolic="YES" id="tRn-21-tqE"/>
......@@ -801,6 +818,7 @@
<viewLayoutGuide key="safeArea" id="fo3-mS-Mxq"/>
</view>
<connections>
<outlet property="addToSiriButton" destination="uBr-jZ-W8U" id="Am3-u0-j5Y"/>
<outlet property="directionsButton" destination="Rd0-fz-V4r" id="4Eg-BB-g2o"/>
<outlet property="facilityDetailView" destination="1VL-kk-arL" id="Un1-Pm-5gH"/>
<outlet property="favoritesButton" destination="Mbm-hc-vWv" id="CLZ-N6-AGv"/>
......
......@@ -58,6 +58,10 @@
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSUserActivityTypes</key>
<array>
<string>WOPViewFacilityIntent</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
......
......@@ -9,8 +9,11 @@
import UIKit
import MapKit
import WhatsOpenKit
import Intents
import IntentsUI
class DetailViewButtonsViewController: UIViewController {
class DetailViewButtonsViewController: UIViewController, INUIAddVoiceShortcutViewControllerDelegate {
@IBOutlet var facilityDetailView: UIView!
var detailViewController: WOPFacilityDetailViewController?
......@@ -19,7 +22,10 @@ class DetailViewButtonsViewController: UIViewController {
@IBOutlet var favoritesButton: UIButton!
@IBOutlet var directionsButton: UIButton!
@IBOutlet var shareButton: UIButton!
@IBOutlet var addToSiriButton: UIButton!
let activity = NSUserActivity(activityType: "facility")
/**
Favorites button touch handler
......@@ -119,10 +125,35 @@ class DetailViewButtonsViewController: UIViewController {
shareButton.setImage(#imageLiteral(resourceName: "shareIcon"), for: .normal)
shareButton.setTitle("", for: .normal)
setActivityUp()
let interaction = INInteraction(intent: facility.createIntent(), response: WOPViewFacilityIntentUtils.getIntentResponse(facility, userActivity: activity))
interaction.donate(completion: nil)
// Do any additional setup after loading the view.
}
func setActivityUp() {
activity.isEligibleForHandoff = true
activity.isEligibleForSearch = true
activity.addUserInfoEntries(from: ["facility": facility.facilityName])
activity.title = facility.facilityName
activity.keywords = Set<String>(arrayLiteral: facility.facilityName, facility.facilityLocation!.building)
//activity.keywords = [facility.facilityName, facility.facilityLocation?.building]
activity.webpageURL = URL(string: "https://whatsopen.gmu.edu/")
activity.becomeCurrent()
}
@IBAction func addToSiri(_ sender: Any) {
let intent = facility.createIntent()
if let shortcut = INShortcut(intent: intent) {
let viewController = INUIAddVoiceShortcutViewController(shortcut: INShortcut(intent: intent)!)
viewController.modalPresentationStyle = .formSheet
viewController.delegate = self // Object conforming to `INUIAddVoiceShortcutViewControllerDelegate`.
present(viewController, animated: true, completion: nil)
}
}
func addSubview(_ subView: UIView, toView parentView: UIView) {
parentView.addSubview(subView)
......@@ -138,7 +169,16 @@ class DetailViewButtonsViewController: UIViewController {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
// MARK: INUIAdd... Delegate
func addVoiceShortcutViewController(_ controller: INUIAddVoiceShortcutViewController, didFinishWith voiceShortcut: INVoiceShortcut?, error: Error?) {
controller.dismiss(animated: true, completion: nil)
}
func addVoiceShortcutViewControllerDidCancel(_ controller: INUIAddVoiceShortcutViewController) {
controller.dismiss(animated: true, completion: nil)
}
/*
// MARK: - Navigation
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>INEnums</key>
<array/>
<key>INIntentDefinitionModelVersion</key>
<string>1.0</string>
<key>INIntentDefinitionSystemVersion</key>
<string>18A391</string>
<key>INIntentDefinitionToolsBuildVersion</key>
<string>10A255</string>
<key>INIntentDefinitionToolsVersion</key>
<string>10.0</string>
<key>INIntents</key>
<array>
<dict>
<key>INIntentCategory</key>
<string>information</string>
<key>INIntentDescription</key>
<string>Check whether a facility is open</string>
<key>INIntentDescriptionID</key>
<string>WlOfag</string>
<key>INIntentLastParameterTag</key>
<integer>4</integer>
<key>INIntentName</key>
<string>WOPViewFacility</string>
<key>INIntentParameterCombinations</key>
<dict>
<key>facility,name</key>
<dict>
<key>INIntentParameterCombinationIsPrimary</key>
<true/>
<key>INIntentParameterCombinationSubtitle</key>
<string>Check the hours for ${name}</string>
<key>INIntentParameterCombinationSubtitleID</key>
<string>xdqNpm</string>
<key>INIntentParameterCombinationSupportsBackgroundExecution</key>
<true/>
<key>INIntentParameterCombinationTitle</key>
<string>View ${name} hours</string>
<key>INIntentParameterCombinationTitleID</key>
<string>Ndddug</string>
</dict>
</dict>
<key>INIntentParameters</key>
<array>
<dict>
<key>INIntentParameterDisplayPriority</key>
<integer>1</integer>
<key>INIntentParameterName</key>
<string>facility</string>
<key>INIntentParameterSupportsMultipleValues</key>
<false/>
<key>INIntentParameterTag</key>
<integer>3</integer>
<key>INIntentParameterType</key>
<string>Object</string>
</dict>
<dict>
<key>INIntentParameterDisplayPriority</key>
<integer>2</integer>
<key>INIntentParameterName</key>
<string>name</string>
<key>INIntentParameterSupportsMultipleValues</key>
<false/>
<key>INIntentParameterTag</key>
<integer>4</integer>
<key>INIntentParameterType</key>
<string>String</string>
</dict>
</array>
<key>INIntentResponse</key>
<dict>
<key>INIntentResponseCodes</key>
<array>
<dict>
<key>INIntentResponseCodeFormatString</key>
<string>I couldn't find a facility named ${facilityName}</string>
<key>INIntentResponseCodeFormatStringID</key>
<string>7Sbams</string>
<key>INIntentResponseCodeName</key>
<string>failure</string>
<key>INIntentResponseCodeSuccess</key>
<false/>
</dict>
<dict>
<key>INIntentResponseCodeFormatString</key>
<string>${facilityName} is open until ${nextTime}</string>
<key>INIntentResponseCodeFormatStringID</key>
<string>5h8qD2</string>
<key>INIntentResponseCodeName</key>
<string>success</string>
<key>INIntentResponseCodeSuccess</key>
<true/>
</dict>
<dict>
<key>INIntentResponseCodeFormatString</key>
<string>${facilityName} is currently closed</string>
<key>INIntentResponseCodeFormatStringID</key>
<string>rw1Zn3</string>
<key>INIntentResponseCodeName</key>
<string>closedNoNext</string>
<key>INIntentResponseCodeSuccess</key>
<true/>
</dict>
<dict>
<key>INIntentResponseCodeFormatString</key>
<string>${facilityName} is open 24/7</string>
<key>INIntentResponseCodeFormatStringID</key>
<string>Nt8YD7</string>
<key>INIntentResponseCodeName</key>
<string>success24hour</string>
<key>INIntentResponseCodeSuccess</key>
<true/>
</dict>
<dict>
<key>INIntentResponseCodeFormatString</key>
<string>${facilityName} is currently closed. It will open at ${nextTime}</string>
<key>INIntentResponseCodeFormatStringID</key>
<string>ZLF7PI</string>
<key>INIntentResponseCodeName</key>
<string>closed</string>
<key>INIntentResponseCodeSuccess</key>
<true/>
</dict>
</array>
<key>INIntentResponseLastParameterTag</key>
<integer>4</integer>
<key>INIntentResponseParameters</key>
<array>
<dict>
<key>INIntentResponseParameterDisplayPriority</key>
<integer>1</integer>
<key>INIntentResponseParameterName</key>
<string>facilityName</string>
<key>INIntentResponseParameterSupportsMultipleValues</key>