Skip to content

Commit bcd9f76

Browse files
authored
[Sessions] Replace bundleID with appDisplayVersion (#10551)
1 parent 188083d commit bcd9f76

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

FirebaseSessions/ProtoSupport/Protos/sessions.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ message AndroidApplicationInfo {
212212
// - country
213213
// Next tag: 6
214214
message AppleApplicationInfo {
215-
// The application's bundle id. Eg. com.google.search
215+
// The application's display version, eg. 1.2.3
216216
string bundle_short_version = 1;
217217
// Describes the network connectivity of the device
218218
NetworkConnectionInfo network_connection_info = 3;

FirebaseSessions/Sources/ApplicationInfo.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ protocol ApplicationInfoProtocol {
2929
/// Google App ID / GMP App ID
3030
var appID: String { get }
3131

32-
/// App's bundle ID / bundle short version
33-
var bundleID: String { get }
34-
3532
/// Version of the Firebase SDK
3633
var sdkVersion: String { get }
3734

@@ -68,10 +65,6 @@ class ApplicationInfo: ApplicationInfoProtocol {
6865
self.envParams = envParams
6966
}
7067

71-
var bundleID: String {
72-
return Bundle.main.bundleIdentifier ?? ""
73-
}
74-
7568
var sdkVersion: String {
7669
return FirebaseVersion()
7770
}

FirebaseSessions/Sources/SessionStartEvent.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class SessionStartEvent: NSObject, GDTCOREventDataObject {
4646

4747
// `which_platform_info` tells nanopb which oneof we're choosing to fill in for our proto
4848
proto.application_info.which_platform_info = FIRSESGetAppleApplicationInfoTag()
49-
proto.application_info.apple_app_info.bundle_short_version = makeProtoString(appInfo.bundleID)
49+
proto.application_info.apple_app_info
50+
.bundle_short_version = makeProtoString(appInfo.appDisplayVersion)
5051
proto.application_info.apple_app_info.network_connection_info
5152
.network_type = convertNetworkType(networkType: appInfo.networkInfo.networkType)
5253
proto.application_info.apple_app_info.network_connection_info

FirebaseSessions/Tests/Unit/SessionStartEventTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class SessionStartEventTests: XCTestCase {
8585
)
8686
assertEqualProtoString(
8787
proto.application_info.apple_app_info.bundle_short_version,
88-
expected: MockApplicationInfo.testBundleID,
88+
expected: MockApplicationInfo.testAppDisplayVersion,
8989
fieldName: "bundle_short_version"
9090
)
9191
assertEqualProtoString(

0 commit comments

Comments
 (0)