From f346dd616f9e66790856b009c5e513c189a4d71f Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Thu, 29 Apr 2021 19:44:52 -0700 Subject: [PATCH] iOS new architecture: disallow disabling enforcement when RCT_NEW_ARCHITECTURE is defined Summary: Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D28080430 fbshipit-source-id: 3e89be8419776c4a6da9dd9e8c6c5501c8f6c304 --- React/Base/RCTAssert.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/React/Base/RCTAssert.m b/React/Base/RCTAssert.m index e45589966c..634d7920d0 100644 --- a/React/Base/RCTAssert.m +++ b/React/Base/RCTAssert.m @@ -243,7 +243,11 @@ static BOOL newArchitectureViolationReporting = NO; void RCTEnableNewArchitectureViolationReporting(BOOL enabled) { +#if RCT_NEW_ARCHITECTURE + // Cannot disable the reporting in this mode. +#else newArchitectureViolationReporting = enabled; +#endif } static NSString *getNewArchitectureViolationMessage(id context, NSString *extra)