some small shortcuts improvements. Still not finished, but better

parent f16448fe
......@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>44</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
......
......@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>44</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
......
......@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<key>CFBundleVersion</key>
<string>43</string>
<string>44</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>
......
......@@ -580,6 +580,7 @@
buildConfigurationList = 92589A6D21612D0E0002814F /* Build configuration list for PBXNativeTarget "TodayWidget" */;
buildPhases = (
850CD1FD8C4AD32D27662A75 /* [CP] Check Pods Manifest.lock */,
92CAA54E21665A0000CAF0D4 /* ShellScript */,
92589A5C21612D0D0002814F /* Sources */,
92589A5D21612D0D0002814F /* Frameworks */,
92589A5E21612D0D0002814F /* Resources */,
......@@ -599,6 +600,7 @@
buildConfigurationList = 9273EEE821659B6200CE63DC /* Build configuration list for PBXNativeTarget "ShortcutsExtension" */;
buildPhases = (
F31B89186CA019530B7F6449 /* [CP] Check Pods Manifest.lock */,
92CAA54F21665A1300CAF0D4 /* ShellScript */,
9273EEC721659B6200CE63DC /* Sources */,
9273EEC821659B6200CE63DC /* Frameworks */,
9273EEC921659B6200CE63DC /* Resources */,
......@@ -618,6 +620,7 @@
buildConfigurationList = 9273EEE421659B6200CE63DC /* Build configuration list for PBXNativeTarget "ShortcutsExtensionUI" */;
buildPhases = (
BFB110D778755DB64A054ABC /* [CP] Check Pods Manifest.lock */,
92CAA55021665A1F00CAF0D4 /* ShellScript */,
9273EED021659B6200CE63DC /* Sources */,
9273EED121659B6200CE63DC /* Frameworks */,
9273EED221659B6200CE63DC /* Resources */,
......@@ -991,7 +994,7 @@
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
shellScript = "#!/bin/bash\nbuildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$INFOPLIST_FILE\"";
shellScript = "#!/bin/bash\nbuildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$INFOPLIST_FILE\"\n";
};
9203CBA82023D51A006ACC3B /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
......@@ -1048,6 +1051,57 @@
shellPath = /bin/sh;
shellScript = "#!/bin/bash\nbuildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$INFOPLIST_FILE\"\n";
};
92CAA54E21665A0000CAF0D4 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#!/bin/bash\nbuildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$INFOPLIST_FILE\"\n";
};
92CAA54F21665A1300CAF0D4 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#!/bin/bash\nbuildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$INFOPLIST_FILE\"\n";
};
92CAA55021665A1F00CAF0D4 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#!/bin/bash\nbuildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$INFOPLIST_FILE\"\n";
};
92FF6C7820017E1C00D836AE /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
......@@ -1774,7 +1828,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
......@@ -1988,7 +2042,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
......@@ -2039,7 +2093,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
......
......@@ -787,9 +787,7 @@
<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>
<state key="normal" title="Siri"/>
<connections>
<action selector="addToSiri:" destination="NAf-lT-JCD" eventType="touchUpInside" id="am3-3Y-AGJ"/>
</connections>
......
......@@ -36,7 +36,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>43</string>
<string>44</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
......
......@@ -127,6 +127,12 @@ class DetailViewButtonsViewController: UIViewController, INUIAddVoiceShortcutVie
setActivityUp()
addToSiriButton.tintColor = UIColor.black
addToSiriButton.backgroundColor = UIColor.white
addToSiriButton.layer.borderWidth = 3
addToSiriButton.layer.borderColor = UIColor.black.cgColor
addToSiriButton.layer.cornerRadius = 10
let interaction = INInteraction(intent: facility.createIntent(), response: WOPViewFacilityIntentUtils.getIntentResponse(facility, userActivity: activity))
interaction.donate(completion: nil)
// Do any additional setup after loading the view.
......@@ -146,8 +152,9 @@ class DetailViewButtonsViewController: UIViewController, INUIAddVoiceShortcutVie
@IBAction func addToSiri(_ sender: Any) {
let intent = facility.createIntent()
let shortcuts = INVoiceShortcutCenter.shared
if let shortcut = INShortcut(intent: intent) {
let viewController = INUIAddVoiceShortcutViewController(shortcut: INShortcut(intent: intent)!)
let viewController = INUIAddVoiceShortcutViewController(shortcut: shortcut)
viewController.modalPresentationStyle = .formSheet
viewController.delegate = self // Object conforming to `INUIAddVoiceShortcutViewControllerDelegate`.
present(viewController, animated: true, completion: nil)
......
......@@ -106,7 +106,7 @@
</dict>
<dict>
<key>INIntentResponseCodeFormatString</key>
<string>${facilityName} is open 24/7</string>
<string>${facilityName} is open all day</string>
<key>INIntentResponseCodeFormatStringID</key>
<string>Nt8YD7</string>
<key>INIntentResponseCodeName</key>
......
......@@ -57,6 +57,7 @@ public class WOPFacility: Object, MapContext, Mappable {
let viewFacilityIntent = WOPViewFacilityIntent()
viewFacilityIntent.facility = INObject(identifier: self.facilityName, display: self.facilityName)
viewFacilityIntent.name = self.facilityName
viewFacilityIntent.suggestedInvocationPhrase = "Is \(facilityName) open?"
return viewFacilityIntent
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment