Skip to content

Commit

Permalink
Fix imports in RCTUtilsUIOverride.h (#28946)
Browse files Browse the repository at this point in the history
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](https://github.com/discord/react-native/blob/15a5f3624c40624d8dd0307bbcc1f2b2aba15a1b/React/Base/RCTUtils.h)

## Changelog

[iOS] [Fixed] - Fix imports in `RCTUtilsUIOverride.h`
Pull Request resolved: #28946

Test Plan: RN tester iOS app runs fine.

Differential Revision: D21700030

Pulled By: shergin

fbshipit-source-id: 9ef806b8f656bdad289fbdd3d84ecefb0dea6afb
  • Loading branch information
Fanghao authored and facebook-github-bot committed May 22, 2020
1 parent e85118c commit b7e8f66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions React/Base/RCTUtilsUIOverride.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface RCTUtilsUIOverride : NSObject
/**
Set the global presented view controller instance override.
Expand Down

0 comments on commit b7e8f66

Please sign in to comment.