Skip to content

Commit c5d1371

Browse files
committed
Fix C++ syntax in Objective-C header breaking React module build (facebook#56569)
Summary: Pull Request resolved: facebook#56569 `RCTRedBox2Controller+Internal.h` used a C++ `using` type alias, which fails when compiled as plain Objective-C. This header is currently included in the `React-Core` umbrella header (via the `CoreModulesHeaders` subspec), so it gets compiled in a pure-ObjC context and breaks the RNTester iOS CI build. Here, we replace the `using` with an equivalent `typedef`. NOTE: The underlying issue is that this `+Internal.h` header should not be in the umbrella header at all. I will follow up to make the RedBox 2.0 internal headers private at the CocoaPods level. Changelog: [Internal] ___ overriding_review_checks_triggers_an_audit_and_retroactive_review Oncall Short Name: react_native landed-with-radar-review Reviewed By: sbuggay Differential Revision: D102005814 fbshipit-source-id: d0a5727ee47ea5148a371074bc74e42e503c20f8
1 parent 46e6d75 commit c5d1371

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-native/React/CoreModules/RCTRedBox2Controller+Internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#if RCT_DEV_MENU
1313

14-
using RCTRedBox2ButtonPressHandler = void (^)(void);
14+
typedef void (^RCTRedBox2ButtonPressHandler)(void);
1515

1616
@interface RCTRedBox2Controller : UIViewController <RCTRedBox2Controlling, UITableViewDelegate, UITableViewDataSource>
1717

0 commit comments

Comments
 (0)