From 68063c2fbd50178953ade0fbe89f58e8d43ad64f Mon Sep 17 00:00:00 2001 From: Ryan Tobin Date: Mon, 6 Jan 2025 21:38:07 -0800 Subject: [PATCH] Revert D67878547 Summary: Title Reviewed By: maxalbrightmeta Differential Revision: D67888120 fbshipit-source-id: 66c6f31ef91517fab9752edb752a068c139fe7ed --- .../FBSDKCoreKit/AppEvents/FBSDKAppEvents.m | 2 -- .../Internal/AppEvents/AppEventsTests.swift | 26 +++---------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m index 0664935ff..81201a955 100644 --- a/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m +++ b/FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m @@ -1306,8 +1306,6 @@ - (void) doLogEvent:(FBSDKAppEventName)eventName } if (isImplicitlyLogged) { [FBSDKTypeUtility dictionary:eventDictionary setObject:@"1" forKey:FBSDKAppEventParameterNameImplicitlyLogged]; - } else { - [FBSDKTypeUtility dictionary:eventDictionary setObject:@"0" forKey:FBSDKAppEventParameterNameImplicitlyLogged]; } NSString *currentViewControllerName; diff --git a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsTests.swift b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsTests.swift index 34c27101c..ecbf7647e 100644 --- a/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsTests.swift +++ b/FBSDKCoreKit/FBSDKCoreKitTests/Internal/AppEvents/AppEventsTests.swift @@ -1321,26 +1321,6 @@ final class AppEventsTests: XCTestCase { // MARK: - Tests for log event - func testLogInternalEventImplicit() throws { - appEvents.logInternalEvent( - eventName, - isImplicitlyLogged: true - ) - let capturedParameters = try XCTUnwrap(appEventsStateProvider.state?.capturedEventDictionary) - XCTAssertEqual(capturedParameters["_eventName"] as? String, eventName.rawValue) - XCTAssertEqual(capturedParameters["_implicitlyLogged"] as? String, "1") - } - - func testLogInternalEventNotImplicit() throws { - appEvents.logInternalEvent( - eventName, - isImplicitlyLogged: false - ) - let capturedParameters = try XCTUnwrap(appEventsStateProvider.state?.capturedEventDictionary) - XCTAssertEqual(capturedParameters["_eventName"] as? String, eventName.rawValue) - XCTAssertEqual(capturedParameters["_implicitlyLogged"] as? String, "0") - } - func testLogEventWithValueToSum() throws { appEvents.logEvent( eventName, @@ -1363,7 +1343,7 @@ final class AppEventsTests: XCTestCase { XCTAssertEqual(capturedParameters["_eventName"] as? String, eventName.rawValue) XCTAssertNil(capturedParameters["_valueToSum"]) - XCTAssertEqual(capturedParameters["_implicitlyLogged"] as? String, "0") + XCTAssertNil(capturedParameters["_implicitlyLogged"]) validateAEMReporterCalled( eventName: eventName, @@ -1384,7 +1364,7 @@ final class AppEventsTests: XCTestCase { XCTAssertEqual(capturedParameters["_eventName"] as? String, eventName.rawValue) XCTAssertEqual(capturedParameters["_valueToSum"] as? Double, purchaseAmount) - XCTAssertEqual(capturedParameters["_implicitlyLogged"] as? String, "0") + XCTAssertNil(capturedParameters["_implicitlyLogged"]) validateAEMReporterCalled( eventName: eventName, @@ -1408,7 +1388,7 @@ final class AppEventsTests: XCTestCase { XCTAssertEqual(capturedParameters["_eventName"] as? String, eventName.rawValue) XCTAssertNil(capturedParameters["_valueToSum"]) - XCTAssertEqual(capturedParameters["_implicitlyLogged"] as? String, "0") + XCTAssertNil(capturedParameters["_implicitlyLogged"]) validateAEMReporterCalled( eventName: eventName,