From 98e2a8fcee611abde4828a584cf74ce4d812b770 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 3 Dec 2025 11:20:12 -0500 Subject: [PATCH 1/6] Reduce deployment target from `17.6` to `17.0` --- firebaseai/FirebaseAIExample.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firebaseai/FirebaseAIExample.xcodeproj/project.pbxproj b/firebaseai/FirebaseAIExample.xcodeproj/project.pbxproj index dcd5d91d6..aabc3b33a 100644 --- a/firebaseai/FirebaseAIExample.xcodeproj/project.pbxproj +++ b/firebaseai/FirebaseAIExample.xcodeproj/project.pbxproj @@ -276,7 +276,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.6; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -309,7 +309,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.6; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", From d76f2c71c87e3ecc69d4428c9932f9ee34ac42c7 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 3 Dec 2025 11:38:03 -0500 Subject: [PATCH 2/6] Fix warnings and add TODOs for ambiguous file extensions --- .../Models/MultimodalAttachment.swift | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/firebaseai/FirebaseAIExample/Features/Multimodal/Models/MultimodalAttachment.swift b/firebaseai/FirebaseAIExample/Features/Multimodal/Models/MultimodalAttachment.swift index cdcf7e63b..261a9dcf9 100644 --- a/firebaseai/FirebaseAIExample/Features/Multimodal/Models/MultimodalAttachment.swift +++ b/firebaseai/FirebaseAIExample/Features/Multimodal/Models/MultimodalAttachment.swift @@ -252,18 +252,37 @@ extension MultimodalAttachment { return "audio/mp3" case "mpa": return "audio/m4a" - case "mpeg": - return "audio/mpeg" + // TODO: Find a more accurate way to determine the MIME type. + // Commented out to silence the warning "Literal value is already handled by previous pattern; + // consider removing it". + // Context: .mpeg files are more likely to be video since MP3 files are more likely to use the + // .mp3 file extension. + // case "mpeg": + // return "audio/mpeg" case "mpga": return "audio/mpga" - case "mp4": - return "audio/mp4" + // TODO: Find a more accurate way to determine the MIME type. + // Commented out to silence the warning "Literal value is already handled by previous pattern; + // consider removing it". + // Context: .mp4 files are potentially more likely to be video since AAC and ALAC files + // frequently use the .m4a file extension within the Apple ecosystem, though it is + // still ambiguous whether it is audio or video from the file extension alone. + // case "mp4": + // return "audio/mp4" case "opus": return "audio/opus" case "wav": return "audio/wav" - case "webm": - return "audio/webm" + // TODO: Find a more accurate way to determine the MIME type. + // Commented out to silence the warning "Literal value is already handled by previous pattern; + // consider removing it". + // Context: .webm files are potentially more likely to be video since WebM files frequently use + // the .weba file extension when they only contain audio (Ogg Vorbis / Opus), though it + // is still ambiguous whether it is audio or video based on the file extension alone. + // case "mp4": + // return "audio/mp4" + // case "webm": + // return "audio/webm" // Documents / text case "pdf": From 3582c814fdfd0db9e021c524affc47211c6be91c Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 3 Dec 2025 11:42:43 -0500 Subject: [PATCH 3/6] Revert copyright year for unmodified file `BouncingDots.swift` --- .../FirebaseAIExample/Features/Chat/Views/BouncingDots.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebaseai/FirebaseAIExample/Features/Chat/Views/BouncingDots.swift b/firebaseai/FirebaseAIExample/Features/Chat/Views/BouncingDots.swift index 14715b18b..6895e6723 100644 --- a/firebaseai/FirebaseAIExample/Features/Chat/Views/BouncingDots.swift +++ b/firebaseai/FirebaseAIExample/Features/Chat/Views/BouncingDots.swift @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 7e59234837c11746b648c826457dda2ee68c03b6 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 3 Dec 2025 11:44:26 -0500 Subject: [PATCH 4/6] Move `import ConversationKit` out of `#if canImport(FirebaseAILogic)` --- .../FirebaseAIExample/Features/Chat/Views/MessageView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebaseai/FirebaseAIExample/Features/Chat/Views/MessageView.swift b/firebaseai/FirebaseAIExample/Features/Chat/Views/MessageView.swift index 304bf2bab..9b06b4d90 100644 --- a/firebaseai/FirebaseAIExample/Features/Chat/Views/MessageView.swift +++ b/firebaseai/FirebaseAIExample/Features/Chat/Views/MessageView.swift @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. +import ConversationKit import MarkdownUI import SwiftUI #if canImport(FirebaseAILogic) import FirebaseAILogic - import ConversationKit #else import FirebaseAI #endif From cbb7b11c84993de88559f90f64d8e8bdfe789948 Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 3 Dec 2025 11:46:34 -0500 Subject: [PATCH 5/6] Revert copyright year for unmodified files --- .../Features/Grounding/Views/GroundedResponseView.swift | 2 +- firebaseai/FirebaseAIExample/FirebaseAIExampleApp.swift | 2 +- .../FirebaseAIExample/Shared/Views/ErrorDetailsView.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firebaseai/FirebaseAIExample/Features/Grounding/Views/GroundedResponseView.swift b/firebaseai/FirebaseAIExample/Features/Grounding/Views/GroundedResponseView.swift index 49bc49149..ea0501926 100644 --- a/firebaseai/FirebaseAIExample/Features/Grounding/Views/GroundedResponseView.swift +++ b/firebaseai/FirebaseAIExample/Features/Grounding/Views/GroundedResponseView.swift @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/firebaseai/FirebaseAIExample/FirebaseAIExampleApp.swift b/firebaseai/FirebaseAIExample/FirebaseAIExampleApp.swift index 3e65b241d..1d59440ea 100644 --- a/firebaseai/FirebaseAIExample/FirebaseAIExampleApp.swift +++ b/firebaseai/FirebaseAIExample/FirebaseAIExampleApp.swift @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/firebaseai/FirebaseAIExample/Shared/Views/ErrorDetailsView.swift b/firebaseai/FirebaseAIExample/Shared/Views/ErrorDetailsView.swift index 9affcf7a1..cd1e3f60e 100644 --- a/firebaseai/FirebaseAIExample/Shared/Views/ErrorDetailsView.swift +++ b/firebaseai/FirebaseAIExample/Shared/Views/ErrorDetailsView.swift @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 1bdb878d6883e309b819094bccc485a66cf3ab0f Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Wed, 3 Dec 2025 12:15:54 -0500 Subject: [PATCH 6/6] Fix copy-paste mistake in comment --- .../Features/Multimodal/Models/MultimodalAttachment.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/firebaseai/FirebaseAIExample/Features/Multimodal/Models/MultimodalAttachment.swift b/firebaseai/FirebaseAIExample/Features/Multimodal/Models/MultimodalAttachment.swift index 261a9dcf9..c4502a567 100644 --- a/firebaseai/FirebaseAIExample/Features/Multimodal/Models/MultimodalAttachment.swift +++ b/firebaseai/FirebaseAIExample/Features/Multimodal/Models/MultimodalAttachment.swift @@ -279,8 +279,6 @@ extension MultimodalAttachment { // Context: .webm files are potentially more likely to be video since WebM files frequently use // the .weba file extension when they only contain audio (Ogg Vorbis / Opus), though it // is still ambiguous whether it is audio or video based on the file extension alone. - // case "mp4": - // return "audio/mp4" // case "webm": // return "audio/webm"