From ff98534e0d4b9d2780b030a3c6437e10b688fe5a Mon Sep 17 00:00:00 2001 From: "Daniel W. Steinbrook" Date: Sun, 15 Sep 2024 08:20:30 -0400 Subject: [PATCH] Keep just the changes necessary for this feature --- .../xcshareddata/IDEWorkspaceChecks.plist | 8 -- .../en-GB.lproj/Localizable.strings | Bin 257922 -> 257894 bytes .../en-US.lproj/Localizable.strings | 4 +- .../Default/Callouts/POICallout.swift | 2 +- .../Default/ExplorationGenerator.swift | 4 +- .../Helpers/CalloutStateMachine.swift | 9 ++- .../CalloutButtonPanelViewController.swift | 8 +- .../SearchResultsTableViewController.swift | 4 +- .../Visual UI/Views/FirstLaunch.storyboard | 72 ++++++++---------- .../Code/Visual UI/Views/Map.storyboard | 30 ++++---- .../Code/Visual UI/Views/main.storyboard | 38 ++++----- docs/Soundscape Lab Notebook.md | 71 ----------------- 12 files changed, 80 insertions(+), 170 deletions(-) delete mode 100644 apps/ios/GuideDogs.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 docs/Soundscape Lab Notebook.md diff --git a/apps/ios/GuideDogs.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/apps/ios/GuideDogs.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/apps/ios/GuideDogs.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/apps/ios/GuideDogs/Assets/Localization/en-GB.lproj/Localizable.strings b/apps/ios/GuideDogs/Assets/Localization/en-GB.lproj/Localizable.strings index 456bc2f5ff9078a2bd06999b0eb51b9bc447984d..c6441fcc5171d5464d110cc85c8bc98a1ebed1a1 100644 GIT binary patch delta 85 zcmZp=&;RTmf5R5W9DB|nhE#?EAWocqv7T9Uy4);Aj_LF48G|^388R3W8L}Btr`tO) oicc@%U^bf`<;bWv-E9ez()10B7`fUvI4}Y+)AkJx%$L>y0GGxax&QzG delta 141 zcmaEMkH6_Yf5R5W9Q(;y0etMi3>gfG4B68Kw=s!M-?NC3W4f9%qtbLYdq$b*7wj2D zI2{>sfH0q-eEP&HW>LcuAX9-Mi6Iq876HiuAWmc`0g@?T@k$_B3^9`-lOc~GefnE_ cM)Aof+@z*AxG;*eXE-ndG1K-82j+k40Q`w2^8f$< diff --git a/apps/ios/GuideDogs/Assets/Localization/en-US.lproj/Localizable.strings b/apps/ios/GuideDogs/Assets/Localization/en-US.lproj/Localizable.strings index 3596cb7e..46a811c7 100644 --- a/apps/ios/GuideDogs/Assets/Localization/en-US.lproj/Localizable.strings +++ b/apps/ios/GuideDogs/Assets/Localization/en-US.lproj/Localizable.strings @@ -1597,10 +1597,10 @@ "callouts.audio_beacon.info" = "Updates about distance to the audio beacon when it's set"; /* Shake callouts */ -"callouts.shake_callouts" = "Enable Shake Callouts"; +"callouts.shake_callouts" = "Repeat Callouts"; /* Shake callouts info */ -"callouts.shake_callouts.info" = "Allow callouts to be repeated by shaking the device"; +"callouts.shake_callouts.info" = "Shake the device to repeat the last callout"; /* Callouts Title, Automatic Callouts */ "callouts.automatic_callouts" = "Automatic Callouts"; diff --git a/apps/ios/GuideDogs/Code/Behaviors/Default/Callouts/POICallout.swift b/apps/ios/GuideDogs/Code/Behaviors/Default/Callouts/POICallout.swift index 08b9c932..c630a8d2 100644 --- a/apps/ios/GuideDogs/Code/Behaviors/Default/Callouts/POICallout.swift +++ b/apps/ios/GuideDogs/Code/Behaviors/Default/Callouts/POICallout.swift @@ -111,7 +111,7 @@ struct POICallout: POICalloutProtocol { self.includeDistance = includeDistance self.includePrefixSound = includePrefixSound } - + /// Sounds to callout func sounds(for location: CLLocation?, isRepeat: Bool, automotive: Bool = false) -> Sounds { guard let location = location ?? self.location, let poi = poi else { diff --git a/apps/ios/GuideDogs/Code/Behaviors/Default/ExplorationGenerator.swift b/apps/ios/GuideDogs/Code/Behaviors/Default/ExplorationGenerator.swift index c615b252..4b93b3f7 100644 --- a/apps/ios/GuideDogs/Code/Behaviors/Default/ExplorationGenerator.swift +++ b/apps/ios/GuideDogs/Code/Behaviors/Default/ExplorationGenerator.swift @@ -8,7 +8,7 @@ import CoreLocation -struct ExplorationModeToggled: UserInitiatedEvent { //code handled when one of the four bottom buttons are pressed +struct ExplorationModeToggled: UserInitiatedEvent { let sender: AnyObject? let mode: ExplorationGenerator.Mode let requiredMarkerKeys: [String] @@ -25,7 +25,7 @@ struct ExplorationModeToggled: UserInitiatedEvent { //code handled when one of t /// this mode are finished playing after having toggled a mode on init(_ mode: ExplorationGenerator.Mode, sender: AnyObject? = nil, requiredMarkerKeys: [String] = [], logContext: String? = nil, completion: ((Bool) -> Void)? = nil) { self.mode = mode - self.sender = sender //obtained from function call + self.sender = sender self.requiredMarkerKeys = requiredMarkerKeys self.completionHandler = completion diff --git a/apps/ios/GuideDogs/Code/Behaviors/Helpers/CalloutStateMachine.swift b/apps/ios/GuideDogs/Code/Behaviors/Helpers/CalloutStateMachine.swift index 2b4c62c8..95925c9a 100644 --- a/apps/ios/GuideDogs/Code/Behaviors/Helpers/CalloutStateMachine.swift +++ b/apps/ios/GuideDogs/Code/Behaviors/Helpers/CalloutStateMachine.swift @@ -336,29 +336,30 @@ extension CalloutStateMachine { } else { sounds = callout.sounds(for: strongSelf.geo?.location, automotive: strongSelf.motionActivityContext.isInVehicle) } - + strongSelf.audioEngine.play(sounds) { (success) in calloutGroup.delegate?.calloutFinished(callout, completed: success) - + guard strongSelf.currentState != State.stopping.rawValue else { GDLogVerbose(.stateMachine, "Callout interrupted. Stopping...") strongSelf.stateMachine.fireEvent(.stopped) calloutGroup.onComplete?(false) return } - + guard strongSelf.currentState != State.off.rawValue else { GDLogVerbose(.stateMachine, "Callouts immediately interrupted. Cleaning up...") calloutGroup.onComplete?(false) return } - + guard success else { GDLogVerbose(.stateMachine, "Callout did not finish playing successfully. Terminating state machine...") calloutGroup.onComplete?(false) strongSelf.stateMachine.fireEvent(.failed) return } + strongSelf.stateMachine.fireEvent(.delayCalloutAnnounced) } diff --git a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/CalloutButtonPanelViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/CalloutButtonPanelViewController.swift index beb3c0e5..5565e6b3 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/CalloutButtonPanelViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/CalloutButtonPanelViewController.swift @@ -120,7 +120,7 @@ class CalloutButtonPanelViewController: UIViewController { // MARK: `IBAction` - @IBAction private func onLocateTouchUpInside(_ sender: AnyObject?) { //Triggered when user clicks 'My Location' on main menu + @IBAction private func onLocateTouchUpInside(_ sender: AnyObject?) { updateAnimation(locateImageView, locateAnimation, true) let completion: (Bool) -> Void = { [weak self] _ in @@ -146,7 +146,7 @@ class CalloutButtonPanelViewController: UIViewController { AppContext.process(event) } - @IBAction private func onOrientateTouchUpInside(_ sender: AnyObject?) { //Triggered when user clicks 'Around Me' + @IBAction private func onOrientateTouchUpInside(_ sender: AnyObject?) { updateAnimation(orientateImageView, orientateAnimation, true) AppContext.process(ExplorationModeToggled(.aroundMe, sender: sender, logContext: logContext) { [weak self] _ in @@ -162,7 +162,7 @@ class CalloutButtonPanelViewController: UIViewController { }) } - @IBAction private func onLookAheadTouchUpInside(_ sender: AnyObject?) { //Triggered when user clicks 'Ahead of Me' + @IBAction private func onLookAheadTouchUpInside(_ sender: AnyObject?) { updateAnimation(exploreImageView, exploreAnimation, true) AppContext.process(ExplorationModeToggled(.aheadOfMe, sender: sender, logContext: logContext) { [weak self] _ in @@ -178,7 +178,7 @@ class CalloutButtonPanelViewController: UIViewController { }) } - @IBAction private func onMarkedPointsTouchUpInside(_ sender: AnyObject?) { //Triggered when user clicks 'Nearby Markers' + @IBAction private func onMarkedPointsTouchUpInside(_ sender: AnyObject?) { updateAnimation(markedPointImageView, markedPointsAnimation, true) AppContext.process(ExplorationModeToggled(.nearbyMarkers, sender: sender, logContext: logContext) { [weak self] _ in diff --git a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/SearchResultsTableViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/SearchResultsTableViewController.swift index 6f9bb8fb..b3a0f186 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/SearchResultsTableViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/POI Table/SearchResultsTableViewController.swift @@ -24,7 +24,7 @@ protocol SearchResultsTableViewControllerDelegate: LocationActionDelegate { var isAccessibilityActionsEnabled: Bool { get } } -class SearchResultsTableViewController: UITableViewController{ +class SearchResultsTableViewController: UITableViewController { typealias ListItem = ListItemTableViewCellConfigurator.ListItem @@ -148,7 +148,7 @@ class SearchResultsTableViewController: UITableViewController{ return poi }) - + let selectionDataSource = TableViewDataSource(header: nil, models: selections.asListItemWithoutIndex, cellConfigurator: configurator) let calloutDataSource = TableViewDataSource(header: GDLocalizedString("poi_screen.header.recent.callouts"), models: callouts.asListItemWithoutIndex, cellConfigurator: configurator) diff --git a/apps/ios/GuideDogs/Code/Visual UI/Views/FirstLaunch.storyboard b/apps/ios/GuideDogs/Code/Visual UI/Views/FirstLaunch.storyboard index 5a5c0cc4..da233535 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Views/FirstLaunch.storyboard +++ b/apps/ios/GuideDogs/Code/Visual UI/Views/FirstLaunch.storyboard @@ -1,9 +1,7 @@ - - + - - + @@ -16,14 +14,14 @@ - + - + - + Your use of Soundscape is subject to the terms of the Company Services Agreement. Please check the box below to agree and continue. @@ -55,14 +53,14 @@ - + - + - - - - - - - - - - - diff --git a/apps/ios/GuideDogs/Code/Visual UI/Views/Map.storyboard b/apps/ios/GuideDogs/Code/Visual UI/Views/Map.storyboard index ef469150..a3f120a4 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Views/Map.storyboard +++ b/apps/ios/GuideDogs/Code/Visual UI/Views/Map.storyboard @@ -1,9 +1,9 @@ - + - + @@ -16,7 +16,7 @@ - + @@ -36,17 +36,17 @@ - + - + - +