mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix RCTAppSetupPrepareApp import error from .m (#42172)
Summary:
This PR tries to fix a build error when `import <React/RCTAppSetupUtils.h>` from *.m files. Since the `[[deprecated("")]]` syntax is a C++14 feature and it was placed inside the `RCT_EXTERN_C_BEGIN` block. If the file in imported from Objective-C *.m files or Swift files, it will have a syntax error. Instead of using the C++ syntax, this PR uses the `__deprecated_msg()` statement that is also used in other code in react-native and that is C supported syntax.
bypass-github-export-checks
## Changelog:
[IOS] [FIXED] - Fix RCTAppSetupPrepareApp.h import error from Objective-C *.m files
Pull Request resolved: https://github.com/facebook/react-native/pull/42172
Test Plan:
- test building and importing **RCTAppSetupPrepareApp.h** from a *.m file
- test `RCTAppSetupPrepareApp(application, turboModuleEnabled)` will show a compile warning
Reviewed By: arushikesarwani94
Differential Revision: D52603421
Pulled By: cipolleschi
fbshipit-source-id: bfec8d0ba6378a265ad30dd8ca1d3ab15cff96ed
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f5b824af16
commit
de0c43ead4
@@ -55,9 +55,8 @@ void RCTAppSetupPrepareApp(
|
||||
|
||||
RCT_EXTERN_C_BEGIN
|
||||
|
||||
[[deprecated("Use the 3-argument overload of RCTAppSetupPrepareApp instead")]] void RCTAppSetupPrepareApp(
|
||||
UIApplication *application,
|
||||
BOOL turboModuleEnabled);
|
||||
void RCTAppSetupPrepareApp(UIApplication *application, BOOL turboModuleEnabled)
|
||||
__deprecated_msg("Use the 3-argument overload of RCTAppSetupPrepareApp instead");
|
||||
|
||||
UIView *RCTAppSetupDefaultRootView(
|
||||
RCTBridge *bridge,
|
||||
|
||||
Reference in New Issue
Block a user