summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2020-03-04 16:11:56 -0500
committerJoel Fischer <joeljfischer@gmail.com>2020-03-04 16:11:56 -0500
commit597962a63c05baa9929e422533aba878488e471f (patch)
treef7ba17507d8056375cbd531ddcb08c114171e0e4
parent11ab1e27d79a89004ea3bdbfebd8ba86b8b81ffc (diff)
downloadsdl_ios-597962a63c05baa9929e422533aba878488e471f.tar.gz
Add logging to example app
-rw-r--r--Example Apps/Example Swift/PerformInteractionManager.swift4
1 files changed, 4 insertions, 0 deletions
diff --git a/Example Apps/Example Swift/PerformInteractionManager.swift b/Example Apps/Example Swift/PerformInteractionManager.swift
index 793f6526c..38bf9f606 100644
--- a/Example Apps/Example Swift/PerformInteractionManager.swift
+++ b/Example Apps/Example Swift/PerformInteractionManager.swift
@@ -56,16 +56,19 @@ private extension PerformInteractionManager {
extension PerformInteractionManager: SDLChoiceSetDelegate {
func choiceSet(_ choiceSet: SDLChoiceSet, didSelectChoice choice: SDLChoiceCell, withSource source: SDLTriggerSource, atRowIndex rowIndex: UInt) {
+ SDLLog.d("User selected row: \(rowIndex), choice: \(choice)")
manager.send(SDLSpeak(tts: TTSGoodJob))
}
func choiceSet(_ choiceSet: SDLChoiceSet, didReceiveError error: Error) {
+ SDLLog.e("Error presenting choice set: \(error)")
manager.send(SDLSpeak(tts: TTSYouMissed))
}
}
extension PerformInteractionManager: SDLKeyboardDelegate {
func keyboardDidAbort(withReason event: SDLKeyboardEvent) {
+ SDLLog.w("Keyboard aborted with reason: \(event)")
switch event {
case SDLKeyboardEvent.cancelled:
manager.send(SDLSpeak(tts: TTSYouMissed))
@@ -76,6 +79,7 @@ extension PerformInteractionManager: SDLKeyboardDelegate {
}
func userDidSubmitInput(_ inputText: String, withEvent source: SDLKeyboardEvent) {
+ SDLLog.d("User did submit keyboard input: \(inputText), with event: \(source)")
switch source {
case SDLKeyboardEvent.voice: break
// Start Voice search