Skip to content

Commit 88d81ac

Browse files
authored
[Firebase AI] Fix warnings introduced in #1812 (#1824)
1 parent 26eeb96 commit 88d81ac

File tree

7 files changed

+30
-13
lines changed

7 files changed

+30
-13
lines changed

firebaseai/FirebaseAIExample.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
277277
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
278278
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
279-
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
279+
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
280280
LD_RUNPATH_SEARCH_PATHS = (
281281
"$(inherited)",
282282
"@executable_path/Frameworks",
@@ -309,7 +309,7 @@
309309
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
310310
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
311311
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
312-
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
312+
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
313313
LD_RUNPATH_SEARCH_PATHS = (
314314
"$(inherited)",
315315
"@executable_path/Frameworks",

firebaseai/FirebaseAIExample/Features/Chat/Views/BouncingDots.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

firebaseai/FirebaseAIExample/Features/Chat/Views/MessageView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
import ConversationKit
1516
import MarkdownUI
1617
import SwiftUI
1718
#if canImport(FirebaseAILogic)
1819
import FirebaseAILogic
19-
import ConversationKit
2020
#else
2121
import FirebaseAI
2222
#endif

firebaseai/FirebaseAIExample/Features/Grounding/Views/GroundedResponseView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

firebaseai/FirebaseAIExample/Features/Multimodal/Models/MultimodalAttachment.swift

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,18 +252,35 @@ extension MultimodalAttachment {
252252
return "audio/mp3"
253253
case "mpa":
254254
return "audio/m4a"
255-
case "mpeg":
256-
return "audio/mpeg"
255+
// TODO: Find a more accurate way to determine the MIME type.
256+
// Commented out to silence the warning "Literal value is already handled by previous pattern;
257+
// consider removing it".
258+
// Context: .mpeg files are more likely to be video since MP3 files are more likely to use the
259+
// .mp3 file extension.
260+
// case "mpeg":
261+
// return "audio/mpeg"
257262
case "mpga":
258263
return "audio/mpga"
259-
case "mp4":
260-
return "audio/mp4"
264+
// TODO: Find a more accurate way to determine the MIME type.
265+
// Commented out to silence the warning "Literal value is already handled by previous pattern;
266+
// consider removing it".
267+
// Context: .mp4 files are potentially more likely to be video since AAC and ALAC files
268+
// frequently use the .m4a file extension within the Apple ecosystem, though it is
269+
// still ambiguous whether it is audio or video from the file extension alone.
270+
// case "mp4":
271+
// return "audio/mp4"
261272
case "opus":
262273
return "audio/opus"
263274
case "wav":
264275
return "audio/wav"
265-
case "webm":
266-
return "audio/webm"
276+
// TODO: Find a more accurate way to determine the MIME type.
277+
// Commented out to silence the warning "Literal value is already handled by previous pattern;
278+
// consider removing it".
279+
// Context: .webm files are potentially more likely to be video since WebM files frequently use
280+
// the .weba file extension when they only contain audio (Ogg Vorbis / Opus), though it
281+
// is still ambiguous whether it is audio or video based on the file extension alone.
282+
// case "webm":
283+
// return "audio/webm"
267284

268285
// Documents / text
269286
case "pdf":

firebaseai/FirebaseAIExample/FirebaseAIExampleApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

firebaseai/FirebaseAIExample/Shared/Views/ErrorDetailsView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)