-
Notifications
You must be signed in to change notification settings - Fork 24.7k
fix React-jsitooling build error for use_frameworks build #50252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0c5d2d6
to
38cfd10
Compare
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cipolleschi merged this pull request in 7786805. |
This pull request was successfully merged by @Kudo in 7786805 When will my fix make it into a release? | How to file a pick request? |
Summary: to resolve use_frameworks build error. this is an edge case happening only when there's objective-c files import to `React_RCTAppDelegate`. Xcode will have `include of non-modular header inside framework module` error originally. this is the generated umbrella header for jsitooling is incorrect. even the header path are correct, they are not modular headers. ~this pr adds a workaround to import header from outside the module.~ updates: this pr uses a forward declaration to prevent exposing the dependency in umbrella header. [IOS] [FIXED] - `JSRuntimeFactoryCAPI.h` build error for `use_frameworks` build Pull Request resolved: #50252 Test Plan: to reproduce the build error, we can build `USE_FRAMEWORKS=static bundle exec pod install` from rn-tester. we also need to import `React_RCTAppDelegate` from objective-c files. in this case, we can add `import React_RCTAppDelegate;` in rn-tester's main.m ```diff --- a/packages/rn-tester/RNTester/main.m +++ b/packages/rn-tester/RNTester/main.m @@ -8,6 +8,9 @@ #import <UIKit/UIKit.h> #import "AppDelegate.h" +@import React_RCTAppDelegate; +// This also triggers the error +//#import <React_RCTAppDelegate/React-RCTAppDelegate-umbrella.h> int main(int argc, char *argv[]) { ``` Reviewed By: fabriziocucci Differential Revision: D71963188 Pulled By: cipolleschi fbshipit-source-id: 5d566ae5aadb9efc032aacfe32862ea289134f87
This pull request was successfully merged by @Kudo in 6c907ee When will my fix make it into a release? | How to file a pick request? |
Summary:
to resolve use_frameworks build error. this is an edge case happening only when there's objective-c files import to
React_RCTAppDelegate
. Xcode will haveinclude of non-modular header inside framework module
error originally. this is the generated umbrella header for jsitooling is incorrect. even the header path are correct, they are not modular headers.this pr adds a workaround to import header from outside the module.updates: this pr uses a forward declaration to prevent exposing the dependency in umbrella header.Changelog:
[IOS] [FIXED] -
JSRuntimeFactoryCAPI.h
build error foruse_frameworks
buildTest Plan:
to reproduce the build error, we can build
USE_FRAMEWORKS=static bundle exec pod install
from rn-tester. we also need to importReact_RCTAppDelegate
from objective-c files. in this case, we can add@import React_RCTAppDelegate;
in rn-tester's main.m