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 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;