Skip to content

Commit e3a4787

Browse files
committed
Empty for unknown version
1 parent a4dfa01 commit e3a4787

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

FirebaseVertexAI/Sources/GenerativeAIService.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ struct GenerativeAIService {
195195

196196
if firebaseInfo.app.isDataCollectionDefaultEnabled {
197197
urlRequest.setValue(firebaseInfo.googleAppID, forHTTPHeaderField: "X-Firebase-AppId")
198-
let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ??
199-
"unknown"
200-
urlRequest.setValue(appVersion, forHTTPHeaderField: "X-Firebase-AppVersion")
198+
if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
199+
urlRequest.setValue(appVersion, forHTTPHeaderField: "X-Firebase-AppVersion")
200+
}
201201
}
202202

203203
let encoder = JSONEncoder()

0 commit comments

Comments
 (0)