Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open-ios
Commits
b09c04df
Unverified
Commit
b09c04df
authored
Oct 04, 2018
by
Zach Knox
Browse files
some small shortcuts improvements. Still not finished, but better
parent
f16448fe
Changes
9
Hide whitespace changes
Inline
Side-by-side
WhatsOpen/ShortcutsExtension/Info.plist
View file @
b09c04df
...
...
@@ -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>
...
...
WhatsOpen/ShortcutsExtensionUI/Info.plist
View file @
b09c04df
...
...
@@ -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>
...
...
WhatsOpen/TodayWidget/Info.plist
View file @
b09c04df
...
...
@@ -19,7 +19,7 @@
<key>
CFBundleShortVersionString
</key>
<string>
1.2
</string>
<key>
CFBundleVersion
</key>
<string>
4
3
</string>
<string>
4
4
</string>
<key>
NSExtension
</key>
<dict>
<key>
NSExtensionMainStoryboard
</key>
...
...
WhatsOpen/WhatsOpen.xcodeproj/project.pbxproj
View file @
b09c04df
...
...
@@ -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
=
1
0.2
;
IPHONEOS_DEPLOYMENT_TARGET
=
1
2.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
=
1
0.2
;
IPHONEOS_DEPLOYMENT_TARGET
=
1
2.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
=
1
0.2
;
IPHONEOS_DEPLOYMENT_TARGET
=
1
2.0
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
iphoneos
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Owholemodule"
;
...
...
WhatsOpen/WhatsOpen/Base.lproj/Main.storyboard
View file @
b09c04df
...
...
@@ -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>
...
...
WhatsOpen/WhatsOpen/Info.plist
View file @
b09c04df
...
...
@@ -36,7 +36,7 @@
</dict>
</array>
<key>
CFBundleVersion
</key>
<string>
4
3
</string>
<string>
4
4
</string>
<key>
Fabric
</key>
<dict>
<key>
APIKey
</key>
...
...
WhatsOpen/WhatsOpen/Views/DetailViewButtonsViewController.swift
View file @
b09c04df
...
...
@@ -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
:
INS
hortcut
(
intent
:
intent
)
!
)
let
viewController
=
INUIAddVoiceShortcutViewController
(
shortcut
:
s
hortcut
)
viewController
.
modalPresentationStyle
=
.
formSheet
viewController
.
delegate
=
self
// Object conforming to `INUIAddVoiceShortcutViewControllerDelegate`.
present
(
viewController
,
animated
:
true
,
completion
:
nil
)
...
...
WhatsOpen/WhatsOpenKit/Intents.intentdefinition
View file @
b09c04df
...
...
@@ -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>
...
...
WhatsOpen/WhatsOpenKit/Model.swift
View file @
b09c04df
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment