Update Standard Parameters List

Summary: TSIA

Reviewed By: KylinChang

Differential Revision: D46920664

fbshipit-source-id: 6477ba83da59ca67cbc9fa874234f5cfca2f5b7f
This commit is contained in:
Shawn Zeng
2023-06-23 10:03:34 -07:00
committed by Facebook GitHub Bot
parent b06c49aead
commit 8845830fe7
2 changed files with 96 additions and 0 deletions

View File

@@ -86,6 +86,66 @@ final class ProtectedModeManager: _AppEventsParameterProcessing {
"lead_event_source",
"predicted_ltv",
"product_catalog_id",
"app_user_id",
"appVersion",
"_eventName",
"_eventName_md5",
"_currency",
"_implicitlyLogged",
"_inBackground",
"_isTimedEvent",
"_logTime",
"fb_order_id",
"_session_id",
"_ui",
"_valueToSum",
"_valueToUpdate",
"_is_fb_codeless",
"_is_suggested_event",
"_fb_pixel_referral_id",
"fb_pixel_id",
"trace_id",
"user_agent",
"subscription_id",
"predicted_ltv",
"event_id",
"_restrictedParams",
"_onDeviceParams",
"purchase_valid_result_type",
"core_lib_included",
"login_lib_included",
"share_lib_included",
"place_lib_included",
"messenger_lib_included",
"applinks_lib_included",
"marketing_lib_included",
"_codeless_action",
"sdk_initialized",
"billing_client_lib_included",
"billing_service_lib_included",
"user_data_keys",
"device_push_token",
"fb_mobile_pckg_fp",
"fb_mobile_app_cert_hash",
"aggregate_id",
"anonymous_id",
"campaign_ids",
"fb_post_attachment",
"receipt_data",
"ad_type",
"fb_content",
"fb_content_id",
"fb_content_type",
"fb_currency",
"fb_description",
"fb_level",
"fb_max_rating_value",
"fb_num_items",
"fb_order_id",
"fb_payment_info_available",
"fb_registration_method",
"fb_search_string",
"fb_success",
]
func enable() {

View File

@@ -0,0 +1,36 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
@testable import FBSDKCoreKit
final class ProtectedModeManagerTests: XCTestCase {
let protectedModeManager = ProtectedModeManager()
let sampleParameters: [AppEvents.ParameterName: Any] = [
AppEvents.ParameterName.pushCampaign: "fb_mobile_catalog_update",
AppEvents.ParameterName.productTitle: "Coffee 4",
AppEvents.ParameterName.logTime: 1686615025,
AppEvents.ParameterName.implicitlyLogged: true,
]
func testProcessParametersWithoutEnable() {
XCTAssertEqual(
protectedModeManager.processParameters(sampleParameters, eventName: AppEvents.Name.addedToCart)?.count,
4,
"It should not do the parameter filtering without enbaled"
)
}
func testProcessParametersWithEnable() {
protectedModeManager.enable()
XCTAssertEqual(
protectedModeManager.processParameters(sampleParameters, eventName: AppEvents.Name.addedToCart)?.count,
2,
"It should do the parameter filtering when enbaled"
)
}
}