Skip to content

Commit

Permalink
Revert D67878547
Browse files Browse the repository at this point in the history
Summary: Title

Reviewed By: maxalbrightmeta

Differential Revision: D67888120

fbshipit-source-id: 66c6f31ef91517fab9752edb752a068c139fe7ed
  • Loading branch information
ryantobinmeta authored and facebook-github-bot committed Jan 7, 2025
1 parent b510926 commit 68063c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
2 changes: 0 additions & 2 deletions FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 68063c2

Please sign in to comment.