From dc8f152c571e98a32d4d2cea7384eddcee57c63e Mon Sep 17 00:00:00 2001 From: Gabe Godoi Date: Fri, 4 Jul 2025 21:06:03 -0300 Subject: [PATCH 1/2] docs: update instructions for most recent updates --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 0d956b5..8eccfd3 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,9 @@ This package relies heavily on the [`daily_flutter`](https://pub.dev/packages/daily_flutter) package. Please refer to the [daily_flutter pub.dev page](https://pub.dev/packages/daily_flutter) for the most up-to-date version constraints and platform requirements. +**iOS:** Requires iOS 13.0 or higher due to the `daily_flutter` dependency. +**Android:** Requires SDK version 24 or higher due to the `daily_flutter` dependency. + ### Web - No special requirements. The Vapi Web SDK is loaded under the hood via [jsdelivr](https://www.jsdelivr.com/), and a specific version is hardcoded to ensure compatibility with this Flutter package. For more details, see `lib/src/platform/web/vapi_web_client.dart`. @@ -37,6 +40,12 @@ Then, follow the platform-specific setup instructions for `permission_handler`: ### iOS +**Important:** This package requires iOS 13.0 or higher due to the `daily_flutter` dependency. Make sure to set the iOS deployment target in your Podfile: + +```ruby +platform :ios, '13.0' +``` + According to the permission_handler instructions above, add the permission flags for microphone. Also add this to your Info.plist: @@ -77,6 +86,16 @@ Add the necessary permissions to your AndroidManifest.xml: Add the permission flags for microphone according to the permission_handler instructions above. +**Important:** This package requires Android SDK version 24 or higher due to the `daily_flutter` dependency. Make sure to set the minimum SDK version in your build.gradle.kts: + +```kotlin +android { + defaultConfig { + minSdk = 24 + } +} +``` + --- ### Web From bf2eb300560406829a69cfcc2466ad0af2db4fd5 Mon Sep 17 00:00:00 2001 From: Gabe Godoi Date: Fri, 4 Jul 2025 21:06:23 -0300 Subject: [PATCH 2/2] fix(call): set assistantId as optional string --- lib/src/platform/mobile/vapi_mobile_call.dart | 5 +++-- lib/src/platform/web/vapi_web_call.dart | 5 +++-- lib/src/vapi_call_interface.dart | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/src/platform/mobile/vapi_mobile_call.dart b/lib/src/platform/mobile/vapi_mobile_call.dart index c661851..c4eb0f1 100644 --- a/lib/src/platform/mobile/vapi_mobile_call.dart +++ b/lib/src/platform/mobile/vapi_mobile_call.dart @@ -119,8 +119,9 @@ class VapiMobileCall implements VapiCall { final String webCallUrl; /// ID of the assistant handling this call + /// May be null when using inline assistant configuration @override - final String assistantId; + final String? assistantId; /// Assistant configuration overrides for this call @override @@ -165,7 +166,7 @@ class VapiMobileCall implements VapiCall { final transport = VapiCallTransport.fromJson( apiResponse['transport'] as Map); final webCallUrl = apiResponse['webCallUrl'] as String; - final assistantId = apiResponse['assistantId'] as String; + final assistantId = apiResponse['assistantId'] as String?; final assistantOverrides = Map.from( apiResponse['assistantOverrides'] as Map); diff --git a/lib/src/platform/web/vapi_web_call.dart b/lib/src/platform/web/vapi_web_call.dart index 18a3756..156788d 100644 --- a/lib/src/platform/web/vapi_web_call.dart +++ b/lib/src/platform/web/vapi_web_call.dart @@ -83,8 +83,9 @@ class VapiWebCall implements VapiCall { final String webCallUrl; /// ID of the assistant handling this call. + /// May be null when using inline assistant configuration. @override - final String assistantId; + final String? assistantId; /// Assistant configuration overrides for this call. @override @@ -156,7 +157,7 @@ class VapiWebCall implements VapiCall { final transportTmp = Map.from(callData['transport']); final transport = VapiCallTransport.fromJson(transportTmp); final webCallUrl = callData['webCallUrl']; - final assistantId = callData['assistantId']; + final assistantId = callData['assistantId'] as String?; final assistantOverrides = Map.from(callData['assistantOverrides']); diff --git a/lib/src/vapi_call_interface.dart b/lib/src/vapi_call_interface.dart index 3b448a4..d874328 100644 --- a/lib/src/vapi_call_interface.dart +++ b/lib/src/vapi_call_interface.dart @@ -19,7 +19,8 @@ abstract interface class VapiCall { String get id; /// ID of the assistant handling this call. - String get assistantId; + /// May be null when using inline assistant configuration. + String? get assistantId; /// Assistant configuration overrides for this call. Map get assistantOverrides;