Skip to content

Fix RCTAppSetupPrepareApp import error from .m#42172

Closed
Kudo wants to merge 1 commit into
react:mainfrom
Kudo:fix-RCTAppSetupPrepareApp-error
Closed

Fix RCTAppSetupPrepareApp import error from .m#42172
Kudo wants to merge 1 commit into
react:mainfrom
Kudo:fix-RCTAppSetupPrepareApp-error

Conversation

@Kudo

@Kudo Kudo commented Jan 8, 2024

Copy link
Copy Markdown
Contributor

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.

Changelog:

[IOS] [FIXED] - Fix RCTAppSetupPrepareApp.h import error from Objective-C *.m files

Test Plan:

  • test building and importing RCTAppSetupPrepareApp.h from a *.m file
  • test RCTAppSetupPrepareApp(application, turboModuleEnabled) will show a compile warning

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jan 8, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 9, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@cipolleschi merged this pull request in de0c43e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants