From d93788301c1fafceba4c3e2ceb40cd4e49c6ae8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Knutzen?= <2263015+hakonk@users.noreply.github.com> Date: Tue, 28 May 2024 04:54:09 -0700 Subject: [PATCH] Add missing call to super.viewDidLoad in RCTRedBox.mm (#44686) Summary: When running the Analyzer in Xcode, I got a warning denoting that `viewDidLoad` was not called on `super` in the overridden `RCTRedBox.viewDidLoad`. While I have not observed any anomalies, it is best practice to call on super in the overridden view controller life cycle methods. ## Changelog: [iOS] [FIXED] - Add missing call to `[super viewDidLoad]` in `RCTRedBox.mm`. Pull Request resolved: https://github.com/facebook/react-native/pull/44686 Test Plan: Running the RNTester yielded the following screenshot: Screenshot 2024-05-27 at 11 26 40 Reviewed By: fabriziocucci Differential Revision: D57856354 Pulled By: javache fbshipit-source-id: d76a4779e02f40af69eed156489e57299968d4be --- packages/react-native/React/CoreModules/RCTRedBox.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/React/CoreModules/RCTRedBox.mm b/packages/react-native/React/CoreModules/RCTRedBox.mm index 5c40dbbcd33..d74c032d570 100644 --- a/packages/react-native/React/CoreModules/RCTRedBox.mm +++ b/packages/react-native/React/CoreModules/RCTRedBox.mm @@ -95,6 +95,7 @@ - (void)viewDidLoad { + [super viewDidLoad]; self.view.backgroundColor = [UIColor blackColor]; const CGFloat buttonHeight = 60;