From 5328f84df410552620f3cb2d0592a17b747a857b Mon Sep 17 00:00:00 2001 From: Filipi Fuchter Date: Wed, 2 Jul 2025 12:06:15 -0300 Subject: [PATCH] Fixed an issue to disconnect the iOS chatbot demo. --- .../SimpleChatbot.xcodeproj/project.pbxproj | 23 ++++++++++++------- .../xcshareddata/swiftpm/Package.resolved | 15 ++++++------ .../model/CallContainerModel.swift | 7 +++--- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/examples/simple-chatbot/client/ios/SimpleChatbot.xcodeproj/project.pbxproj b/examples/simple-chatbot/client/ios/SimpleChatbot.xcodeproj/project.pbxproj index 0c770e711..478f90bbd 100644 --- a/examples/simple-chatbot/client/ios/SimpleChatbot.xcodeproj/project.pbxproj +++ b/examples/simple-chatbot/client/ios/SimpleChatbot.xcodeproj/project.pbxproj @@ -15,7 +15,6 @@ 90031FC22C616EE900408370 /* SimpleChatbotUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90031FC12C616EE900408370 /* SimpleChatbotUITests.swift */; }; 90031FC42C616EE900408370 /* SimpleChatbotUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90031FC32C616EE900408370 /* SimpleChatbotUITestsLaunchTests.swift */; }; 90031FDC2C6D5DD700408370 /* ToastModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90031FDB2C6D5DD700408370 /* ToastModifier.swift */; }; - 907C98842D37E6AF0079441F /* PipecatClientIOSDaily in Frameworks */ = {isa = PBXBuildFile; productRef = 907C98832D37E6AF0079441F /* PipecatClientIOSDaily */; }; 90ABB98E2C735ED6000D9CC7 /* MeetingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90ABB98D2C735ED6000D9CC7 /* MeetingView.swift */; }; 90ABB9902C736A8B000D9CC7 /* WaveformView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90ABB98F2C736A8B000D9CC7 /* WaveformView.swift */; }; 90ABB9932C73820D000D9CC7 /* MicrophoneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90ABB9922C73820D000D9CC7 /* MicrophoneView.swift */; }; @@ -25,6 +24,8 @@ 90ABB9A32C74E1CE000D9CC7 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90ABB9A22C74E1CE000D9CC7 /* SettingsView.swift */; }; 90ABB9A62C74EA8A000D9CC7 /* SettingsPreference.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90ABB9A52C74EA8A000D9CC7 /* SettingsPreference.swift */; }; 90ABB9A82C74EAB1000D9CC7 /* SettingsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90ABB9A72C74EAB1000D9CC7 /* SettingsManager.swift */; }; + 90CC98B02E158093003C2706 /* PipecatClientIOSDaily in Frameworks */ = {isa = PBXBuildFile; productRef = 90CC98AF2E158093003C2706 /* PipecatClientIOSDaily */; }; + 90CC98B62E15820B003C2706 /* PipecatClientIOSDaily in Frameworks */ = {isa = PBXBuildFile; productRef = 90CC98B52E15820B003C2706 /* PipecatClientIOSDaily */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -73,7 +74,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 907C98842D37E6AF0079441F /* PipecatClientIOSDaily in Frameworks */, + 90CC98B62E15820B003C2706 /* PipecatClientIOSDaily in Frameworks */, + 90CC98B02E158093003C2706 /* PipecatClientIOSDaily in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -218,7 +220,8 @@ ); name = SimpleChatbot; packageProductDependencies = ( - 907C98832D37E6AF0079441F /* PipecatClientIOSDaily */, + 90CC98AF2E158093003C2706 /* PipecatClientIOSDaily */, + 90CC98B52E15820B003C2706 /* PipecatClientIOSDaily */, ); productName = SimpleChatbot; productReference = 90031FA32C616EE700408370 /* SimpleChatbot.app */; @@ -293,7 +296,7 @@ ); mainGroup = 90031F9A2C616EE700408370; packageReferences = ( - 907C98822D37E6AF0079441F /* XCRemoteSwiftPackageReference "pipecat-client-ios-daily" */, + 90CC98B42E15820B003C2706 /* XCRemoteSwiftPackageReference "pipecat-client-ios-daily" */, ); productRefGroup = 90031FA42C616EE700408370 /* Products */; projectDirPath = ""; @@ -682,20 +685,24 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 907C98822D37E6AF0079441F /* XCRemoteSwiftPackageReference "pipecat-client-ios-daily" */ = { + 90CC98B42E15820B003C2706 /* XCRemoteSwiftPackageReference "pipecat-client-ios-daily" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/pipecat-ai/pipecat-client-ios-daily/"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 0.3.2; + minimumVersion = 0.3.6; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 907C98832D37E6AF0079441F /* PipecatClientIOSDaily */ = { + 90CC98AF2E158093003C2706 /* PipecatClientIOSDaily */ = { isa = XCSwiftPackageProductDependency; - package = 907C98822D37E6AF0079441F /* XCRemoteSwiftPackageReference "pipecat-client-ios-daily" */; + productName = PipecatClientIOSDaily; + }; + 90CC98B52E15820B003C2706 /* PipecatClientIOSDaily */ = { + isa = XCSwiftPackageProductDependency; + package = 90CC98B42E15820B003C2706 /* XCRemoteSwiftPackageReference "pipecat-client-ios-daily" */; productName = PipecatClientIOSDaily; }; /* End XCSwiftPackageProductDependency section */ diff --git a/examples/simple-chatbot/client/ios/SimpleChatbot.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/examples/simple-chatbot/client/ios/SimpleChatbot.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 9cdcbc713..a81425dd0 100644 --- a/examples/simple-chatbot/client/ios/SimpleChatbot.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/examples/simple-chatbot/client/ios/SimpleChatbot.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,12 +1,13 @@ { + "originHash" : "cc17f08b06def9570d775e9c6f7a8dc10d1588b98127e977c47d052abac659b7", "pins" : [ { "identity" : "daily-client-ios", "kind" : "remoteSourceControl", "location" : "https://github.com/daily-co/daily-client-ios.git", "state" : { - "revision" : "15804ce495780da3ec2d05ab99736315f7bfbd24", - "version" : "0.28.0" + "revision" : "431938db25e5807120e89e2dc5bab1c076729f59", + "version" : "0.31.0" } }, { @@ -14,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pipecat-ai/pipecat-client-ios.git", "state" : { - "revision" : "c679512e367002a1a67da85d503fec72d9b17191", - "version" : "0.3.2" + "revision" : "f92b5e68e56a8311f7d8ead68a7a5674843cbc40", + "version" : "0.3.6" } }, { @@ -23,10 +24,10 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pipecat-ai/pipecat-client-ios-daily/", "state" : { - "revision" : "a337fe6642c52376d2f90eafcb965f5be772ce72", - "version" : "0.3.2" + "revision" : "8f494da903192c22c367ecf9e51248c9b651fbc6", + "version" : "0.3.6" } } ], - "version" : 2 + "version" : 3 } diff --git a/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift b/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift index d8db7cced..b8663bb3b 100644 --- a/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift +++ b/examples/simple-chatbot/client/ios/SimpleChatbot/model/CallContainerModel.swift @@ -78,10 +78,11 @@ class CallContainerModel: ObservableObject { self.saveCredentials(backendURL: baseUrl) } - @MainActor func disconnect() { - self.rtviClientIOS?.disconnect(completion: nil) - self.rtviClientIOS?.release() + Task { @MainActor in + try await self.rtviClientIOS?.disconnect() + self.rtviClientIOS?.release() + } } func showError(message: String) {