Skip to content
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

Fix imports in RCTUtilsUIOverride.h #28946

Closed

Conversation

Fanghao
Copy link
Contributor

@Fanghao Fanghao commented May 21, 2020

Summary

While we build react native 0.62.2 via our Bazel build system, encountered those following errors due to lack of appropriate imports:

external/React-Core/React/Base/RCTUtilsUIOverride.h:8:33: error: cannot find interface declaration for 'NSObject', superclass of 'RCTUtilsUIOverride'
@interface RCTUtilsUIOverride : NSObject
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   ^
external/React-Core/React/Base/RCTUtilsUIOverride.h:12:37: error: expected a type
+ (void)setPresentedViewController:(UIViewController *)presentedViewController;
                                    ^

Add the appropriate imports <Foundation/Foundation.h> and <UIKit/UIKit.h> fix those errors.

Honestly I dont know how it's supposed to work without those imports. Also all the siblings files have the correct imports. e.g. RCTUtils.h

Changelog

[iOS] [Fixed] - Fix imports in RCTUtilsUIOverride.h

Test Plan

RN tester iOS app runs fine.

@Fanghao Fanghao requested a review from shergin as a code owner May 21, 2020 22:15
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 21, 2020
@react-native-bot react-native-bot added Bug Platform: iOS iOS applications. labels May 21, 2020
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 6,743,076 -37,202
android hermes armeabi-v7a 6,408,057 -34,472
android hermes x86 7,124,988 -40,402
android hermes x86_64 7,015,358 -40,706
android jsc arm64-v8a 8,911,716 -36,361
android jsc armeabi-v7a 8,569,071 -33,641
android jsc x86 8,736,752 -39,557
android jsc x86_64 9,312,764 -39,840

Base commit: 43c161c

@analysis-bot
Copy link

analysis-bot commented May 21, 2020

Platform Engine Arch Size (bytes) Diff
ios - universal 809,568 0

Base commit: 43c161c

@shergin
Copy link
Contributor

shergin commented May 22, 2020

Wow, Bazel! Cool!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @Fanghao in b7e8f66.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label May 22, 2020
jerrymarino added a commit to bazel-xcode/PodToBUILD that referenced this pull request Jul 20, 2020
The current search logic didn't write the default prefix header which is
required for some cocoapods. It follows the logic defined in
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:170

Additonally, this was discovered when updating to react native and there
was a required fix for bazel here, which we won't need to keep up with
facebook/react-native#28946
jerrymarino added a commit to bazel-xcode/PodToBUILD that referenced this pull request Jul 20, 2020
The current search logic didn't write the default prefix header which is
required for some cocoapods. It follows the logic defined in
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:170

Additonally, this was discovered when updating to react native and there
was a required fix for bazel here, which we won't need to keep up with
facebook/react-native#28946
jerrymarino added a commit to bazel-xcode/PodToBUILD that referenced this pull request Jul 21, 2020
* Use cocoapods default prefix header

The current search logic didn't write the default prefix header which is
required for some cocoapods. It follows the logic defined in
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:170

Additonally, this was discovered when updating to react native and there
was a required fix for bazel here, which we won't need to keep up with
facebook/react-native#28946

Additionally, it adds react native to the build tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: iOS iOS applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants