Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add product_id to GoogleDataTransport logging for compliance. #12143

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FirebaseMessaging.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ device, and it is completely free.
s.dependency 'GoogleUtilities/Reachability', '~> 7.8'
s.dependency 'GoogleUtilities/Environment', '~> 7.8'
s.dependency 'GoogleUtilities/UserDefaults', '~> 7.8'
s.dependency 'GoogleDataTransport', '~> 9.2'
s.dependency 'GoogleDataTransport', '~> 9.3'
s.dependency 'nanopb', '>= 2.30908.0', '< 2.30910.0'

s.test_spec 'unit' do |unit_tests|
Expand Down
1 change: 1 addition & 0 deletions FirebaseMessaging/Sources/FIRMessagingConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ FOUNDATION_EXPORT NSString *const kFIRMessagingFID;
FOUNDATION_EXPORT NSString *const kFIRMessagingAnalyticsComposerIdentifier;
FOUNDATION_EXPORT NSString *const kFIRMessagingAnalyticsMessageLabel;
FOUNDATION_EXPORT NSString *const kFIRMessagingAnalyticsComposerLabel;
FOUNDATION_EXPORT NSString *const kFIRMessagingProductID;

FOUNDATION_EXPORT NSString *const kFIRMessagingRemoteNotificationsProxyEnabledInfoPlistKey;
FOUNDATION_EXPORT NSString *const kFIRMessagingSubDirectoryName;
Expand Down
1 change: 1 addition & 0 deletions FirebaseMessaging/Sources/FIRMessagingConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
NSString *const kFIRMessagingAnalyticsComposerIdentifier = @"google.c.a.c_id";
NSString *const kFIRMessagingAnalyticsMessageLabel = @"google.c.a.m_l";
NSString *const kFIRMessagingAnalyticsComposerLabel = @"google.c.a.c_l";
NSString *const kFIRMessagingProductID = @"google.product_id";

NSString *const kFIRMessagingRemoteNotificationsProxyEnabledInfoPlistKey =
@"FirebaseAppDelegateProxyEnabled";
Expand Down
9 changes: 8 additions & 1 deletion FirebaseMessaging/Sources/FIRMessagingExtensionHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,14 @@ - (void)exportDeliveryMetricsToBigQueryWithMessageInfo:(NSDictionary *)info {
FIRMessagingMetricsLog *log =
[[FIRMessagingMetricsLog alloc] initWithEventExtension:eventExtension];

GDTCOREvent *event = [transport eventForTransport];
GDTCOREvent *event;
if (info[kFIRMessagingProductID]) {
int32_t productID = [info[kFIRMessagingProductID] intValue];
GDTCORProductData *productData = [[GDTCORProductData alloc] initWithProductID:productID];
event = [transport eventForTransportWithProductData:productData];
} else {
event = [transport eventForTransport];
}
event.dataObject = log;
event.qosTier = GDTCOREventQoSFast;

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ let package = Package(
googleAppMeasurementDependency(),
.package(
url: "https://github.com/google/GoogleDataTransport.git",
"9.2.0" ..< "10.0.0"
"9.3.0" ..< "10.0.0"
),
.package(
url: "https://github.com/google/GoogleUtilities.git",
Expand Down
Loading