Skip to content

Commit e1577df

Browse files
javacheFacebook Github Bot
authored and
Facebook Github Bot
committed
Move all header imports to "<React/..>"
Summary: To make React Native play nicely with our internal build infrastructure we need to properly namespace all of our header includes. Where previously you could do `#import "RCTBridge.h"`, you must now write this as `#import <React/RCTBridge.h>`. If your xcode project still has a custom header include path, both variants will likely continue to work, but for new projects, we're defaulting the header include path to `$(BUILT_PRODUCTS_DIR)/usr/local/include`, where the React and CSSLayout targets will copy a subset of headers too. To make Xcode copy headers phase work properly, you may need to add React as an explicit dependency to your app's scheme and disable "parallelize build". Reviewed By: mmmulani Differential Revision: D4213120 fbshipit-source-id: 84a32a4b250c27699e6795f43584f13d594a9a82
1 parent 5850165 commit e1577df

File tree

220 files changed

+1492
-1197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+1492
-1197
lines changed

Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj

+33-28
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
2D4BD8E61DA2E20D005AC8A8 /* TestBundle.js in Resources */ = {isa = PBXBuildFile; fileRef = 3DD981D51D33C6FB007DC7BE /* TestBundle.js */; };
8888
2D4BD8E71DA2E20D005AC8A8 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14D6D7101B220EB3001FB087 /* libOCMock.a */; };
8989
2D8C2E321DA40403000EE098 /* RCTMultipartStreamReaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 001BFCE31D838343008E587E /* RCTMultipartStreamReaderTests.m */; };
90-
2DD0EFF41DA853B200B0C975 /* libRCTPushNotification-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD0EFF31DA853B200B0C975 /* libRCTPushNotification-tvOS.a */; };
9190
2DD323DC1DA2DDBF000FE1B8 /* FlexibleSizeExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F441E81BEBE5030039B79C /* FlexibleSizeExampleView.m */; };
9291
2DD323DD1DA2DDBF000FE1B8 /* UpdatePropertiesExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 272E6B3C1BEA849E001FCF37 /* UpdatePropertiesExampleView.m */; };
9392
2DD323DE1DA2DDBF000FE1B8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
@@ -212,13 +211,6 @@
212211
remoteGlobalIDString = 2DD3238F1DA2DD8A000FE1B8;
213212
remoteInfo = "UIExplorer-tvOS";
214213
};
215-
2DD0EFF21DA853B200B0C975 /* PBXContainerItemProxy */ = {
216-
isa = PBXContainerItemProxy;
217-
containerPortal = 14DC67E71AB71876001358AB /* RCTPushNotification.xcodeproj */;
218-
proxyType = 2;
219-
remoteGlobalIDString = 2DD0EFE61DA8533A00B0C975;
220-
remoteInfo = "RCTPushNotification-tvOS";
221-
};
222214
2DD323A61DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
223215
isa = PBXContainerItemProxy;
224216
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
@@ -303,6 +295,20 @@
303295
remoteGlobalIDString = 3D13F83D1D6F6AE000E69E0E;
304296
remoteInfo = UIExplorerBundle;
305297
};
298+
3D3C08801DE3424E00C268FA /* PBXContainerItemProxy */ = {
299+
isa = PBXContainerItemProxy;
300+
containerPortal = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */;
301+
proxyType = 2;
302+
remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
303+
remoteInfo = CSSLayout;
304+
};
305+
3D3C08821DE3424E00C268FA /* PBXContainerItemProxy */ = {
306+
isa = PBXContainerItemProxy;
307+
containerPortal = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */;
308+
proxyType = 2;
309+
remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
310+
remoteInfo = "CSSLayout-tvOS";
311+
};
306312
58005BED1ABA80530062E044 /* PBXContainerItemProxy */ = {
307313
isa = PBXContainerItemProxy;
308314
containerPortal = 58005BE41ABA80530062E044 /* RCTTest.xcodeproj */;
@@ -438,9 +444,9 @@
438444
13E501F11D07A84A005F35D8 /* libRCTAnimation.a in Frameworks */,
439445
138DEE241B9EDFB6007F4EA5 /* libRCTCameraRoll.a in Frameworks */,
440446
134A8A2A1AACED7A00945AAE /* libRCTGeolocation.a in Frameworks */,
447+
1341802C1AA9178B003F314A /* libRCTNetwork.a in Frameworks */,
441448
13417FE91AA91432003F314A /* libRCTImage.a in Frameworks */,
442449
3578590A1B28D2CF00341EDB /* libRCTLinking.a in Frameworks */,
443-
1341802C1AA9178B003F314A /* libRCTNetwork.a in Frameworks */,
444450
14DC67F41AB71881001358AB /* libRCTPushNotification.a in Frameworks */,
445451
834C36EC1AF8DED70019C93C /* libRCTSettings.a in Frameworks */,
446452
134180011AA9153C003F314A /* libRCTText.a in Frameworks */,
@@ -469,7 +475,6 @@
469475
isa = PBXFrameworksBuildPhase;
470476
buildActionMask = 2147483647;
471477
files = (
472-
2DD0EFF41DA853B200B0C975 /* libRCTPushNotification-tvOS.a in Frameworks */,
473478
2DD323E31DA2DE3F000FE1B8 /* libRCTAnimation-tvOS.a in Frameworks */,
474479
2DD323E41DA2DE3F000FE1B8 /* libRCTImage-tvOS.a in Frameworks */,
475480
2DD323E51DA2DE3F000FE1B8 /* libRCTLinking-tvOS.a in Frameworks */,
@@ -681,6 +686,8 @@
681686
children = (
682687
14AADF041AC3DB95002390C9 /* libReact.a */,
683688
2DD323D91DA2DD8B000FE1B8 /* libReact-tvOS.a */,
689+
3D3C08811DE3424E00C268FA /* libCSSLayout.a */,
690+
3D3C08831DE3424E00C268FA /* libCSSLayout-tvOS.a */,
684691
);
685692
name = Products;
686693
sourceTree = "<group>";
@@ -712,7 +719,6 @@
712719
isa = PBXGroup;
713720
children = (
714721
14DC67F11AB71876001358AB /* libRCTPushNotification.a */,
715-
2DD0EFF31DA853B200B0C975 /* libRCTPushNotification-tvOS.a */,
716722
);
717723
name = Products;
718724
sourceTree = "<group>";
@@ -1134,13 +1140,6 @@
11341140
remoteRef = 14DC67F01AB71876001358AB /* PBXContainerItemProxy */;
11351141
sourceTree = BUILT_PRODUCTS_DIR;
11361142
};
1137-
2DD0EFF31DA853B200B0C975 /* libRCTPushNotification-tvOS.a */ = {
1138-
isa = PBXReferenceProxy;
1139-
fileType = archive.ar;
1140-
path = "libRCTPushNotification-tvOS.a";
1141-
remoteRef = 2DD0EFF21DA853B200B0C975 /* PBXContainerItemProxy */;
1142-
sourceTree = BUILT_PRODUCTS_DIR;
1143-
};
11441143
2DD323B51DA2DD8B000FE1B8 /* libRCTAnimation-tvOS.a */ = {
11451144
isa = PBXReferenceProxy;
11461145
fileType = archive.ar;
@@ -1211,6 +1210,20 @@
12111210
remoteRef = 357859001B28D2C500341EDB /* PBXContainerItemProxy */;
12121211
sourceTree = BUILT_PRODUCTS_DIR;
12131212
};
1213+
3D3C08811DE3424E00C268FA /* libCSSLayout.a */ = {
1214+
isa = PBXReferenceProxy;
1215+
fileType = archive.ar;
1216+
path = libCSSLayout.a;
1217+
remoteRef = 3D3C08801DE3424E00C268FA /* PBXContainerItemProxy */;
1218+
sourceTree = BUILT_PRODUCTS_DIR;
1219+
};
1220+
3D3C08831DE3424E00C268FA /* libCSSLayout-tvOS.a */ = {
1221+
isa = PBXReferenceProxy;
1222+
fileType = archive.ar;
1223+
path = "libCSSLayout-tvOS.a";
1224+
remoteRef = 3D3C08821DE3424E00C268FA /* PBXContainerItemProxy */;
1225+
sourceTree = BUILT_PRODUCTS_DIR;
1226+
};
12141227
58005BEE1ABA80530062E044 /* libRCTTest.a */ = {
12151228
isa = PBXReferenceProxy;
12161229
fileType = archive.ar;
@@ -1798,11 +1811,7 @@
17981811
GCC_WARN_UNUSED_FUNCTION = YES;
17991812
GCC_WARN_UNUSED_LABEL = YES;
18001813
GCC_WARN_UNUSED_VARIABLE = YES;
1801-
HEADER_SEARCH_PATHS = (
1802-
"$(SRCROOT)/../../React/**",
1803-
"$(SRCROOT)/../../ReactCommon/**",
1804-
"$(SRCROOT)/../../Libraries/**",
1805-
);
1814+
HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/usr/local/include";
18061815
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
18071816
MTL_ENABLE_DEBUG_INFO = YES;
18081817
ONLY_ACTIVE_ARCH = YES;
@@ -1862,11 +1871,7 @@
18621871
GCC_WARN_UNUSED_FUNCTION = YES;
18631872
GCC_WARN_UNUSED_LABEL = YES;
18641873
GCC_WARN_UNUSED_VARIABLE = YES;
1865-
HEADER_SEARCH_PATHS = (
1866-
"$(SRCROOT)/../../React/**",
1867-
"$(SRCROOT)/../../ReactCommon/**",
1868-
"$(SRCROOT)/../../Libraries/**",
1869-
);
1874+
HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/usr/local/include";
18701875
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
18711876
MTL_ENABLE_DEBUG_INFO = NO;
18721877
OTHER_LDFLAGS = (

Examples/UIExplorer/UIExplorer.xcodeproj/xcshareddata/xcschemes/UIExplorer-tvOS.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "0810"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Examples/UIExplorer/UIExplorer.xcodeproj/xcshareddata/xcschemes/UIExplorer.xcscheme

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0730"
3+
LastUpgradeVersion = "0810"
44
version = "1.3">
55
<BuildAction
6-
parallelizeBuildables = "YES"
6+
parallelizeBuildables = "NO"
77
buildImplicitDependencies = "YES">
88
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18+
BuildableName = "libReact.a"
19+
BlueprintName = "React"
20+
ReferencedContainer = "container:../../React/React.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
923
<BuildActionEntry
1024
buildForTesting = "YES"
1125
buildForRunning = "YES"

Examples/UIExplorer/UIExplorer/AppDelegate.m

+7-6
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414

1515
#import "AppDelegate.h"
1616

17-
#import "RCTBridge.h"
18-
#import "RCTBundleURLProvider.h"
19-
#import "RCTJavaScriptLoader.h"
20-
#import "RCTLinkingManager.h"
21-
#import "RCTRootView.h"
17+
#import <React/RCTBridge.h>
18+
#import <React/RCTBundleURLProvider.h>
19+
#import <React/RCTJavaScriptLoader.h>
20+
#import <React/RCTLinkingManager.h>
21+
#import <React/RCTRootView.h>
22+
2223
#if !TARGET_OS_TV
23-
#import "RCTPushNotificationManager.h"
24+
#import <React/RCTPushNotificationManager.h>
2425
#endif
2526

2627
@interface AppDelegate() <RCTBridgeDelegate>

Examples/UIExplorer/UIExplorer/NativeExampleViews/FlexibleSizeExampleView.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
*/
1414

1515
#import <UIKit/UIKit.h>
16-
#import "RCTView.h"
16+
17+
#import <React/RCTView.h>
1718

1819
@interface FlexibleSizeExampleView : RCTView
1920

Examples/UIExplorer/UIExplorer/NativeExampleViews/FlexibleSizeExampleView.m

+7-8
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@
1212
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1313
*/
1414

15-
#import "AppDelegate.h"
16-
1715
#import "FlexibleSizeExampleView.h"
18-
#import "RCTJavaScriptLoader.h"
19-
#import "RCTBridge.h"
20-
#import "RCTRootView.h"
21-
#import "RCTRootViewDelegate.h"
2216

23-
#import "RCTViewManager.h"
17+
#import <React/RCTBridge.h>
18+
#import <React/RCTRootView.h>
19+
#import <React/RCTRootViewDelegate.h>
20+
#import <React/RCTViewManager.h>
21+
22+
#import "AppDelegate.h"
2423

2524
@interface FlexibleSizeExampleViewManager : RCTViewManager
2625

@@ -38,7 +37,7 @@ - (UIView *)view
3837
@end
3938

4039

41-
@interface FlexibleSizeExampleView ()<RCTRootViewDelegate>
40+
@interface FlexibleSizeExampleView () <RCTRootViewDelegate>
4241

4342
@end
4443

Examples/UIExplorer/UIExplorer/NativeExampleViews/UpdatePropertiesExampleView.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
*/
1414

1515
#import <UIKit/UIKit.h>
16-
#import "RCTView.h"
16+
17+
#import <React/RCTView.h>
1718

1819
@interface UpdatePropertiesExampleView : RCTView
1920

Examples/UIExplorer/UIExplorer/NativeExampleViews/UpdatePropertiesExampleView.m

+5-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1313
*/
1414

15-
#import "AppDelegate.h"
16-
1715
#import "UpdatePropertiesExampleView.h"
18-
#import "RCTJavaScriptLoader.h"
19-
#import "RCTBridge.h"
20-
#import "RCTRootView.h"
21-
#import "RCTViewManager.h"
16+
17+
#import <React/RCTRootView.h>
18+
#import <React/RCTViewManager.h>
19+
20+
#import "AppDelegate.h"
2221

2322
@interface UpdatePropertiesExampleViewManager : RCTViewManager
2423

Examples/UIExplorer/UIExplorerUnitTests/OCMock/OCMStubRecorder.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* under the License.
1515
*/
1616

17-
#import "OCMRecorder.h"
17+
#import <React/OCMRecorder.h>
1818

1919

2020
@interface OCMStubRecorder : OCMRecorder
@@ -51,6 +51,3 @@
5151
@property (nonatomic, readonly) OCMStubRecorder *(^ _andForwardToRealObject)(void);
5252

5353
@end
54-
55-
56-

Examples/UIExplorer/UIExplorerUnitTests/RCTConvert_NSURLTests.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
#import <XCTest/XCTest.h>
1616

17-
#import "RCTConvert.h"
17+
#import <React/RCTConvert.h>
18+
1819
#import "RCTUtils.h"
1920

2021
@interface RCTConvert_NSURLTests : XCTestCase

Examples/UIExplorer/UIExplorerUnitTests/RCTImageLoaderHelpers.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1313
*/
1414

15-
#import "RCTImageLoader.h"
15+
#import <React/RCTImageLoader.h>
1616

1717
typedef BOOL (^RCTImageURLLoaderCanLoadImageURLHandler)(NSURL *requestURL);
1818
typedef RCTImageLoaderCancellationBlock (^RCTImageURLLoaderLoadImageURLHandler)(NSURL *imageURL, CGSize size, CGFloat scale, RCTResizeMode resizeMode, RCTImageLoaderProgressBlock progressHandler, RCTImageLoaderCompletionBlock completionHandler);

Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj/project.pbxproj

+3-33
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,12 @@
1010
14C644C41AB0DFC900DE3C65 /* RCTActionSheetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 14C644C21AB0DFC900DE3C65 /* RCTActionSheetManager.m */; };
1111
/* End PBXBuildFile section */
1212

13-
/* Begin PBXCopyFilesBuildPhase section */
14-
58B511D91A9E6C8500147676 /* CopyFiles */ = {
15-
isa = PBXCopyFilesBuildPhase;
16-
buildActionMask = 2147483647;
17-
dstPath = "include/$(PRODUCT_NAME)";
18-
dstSubfolderSpec = 16;
19-
files = (
20-
);
21-
runOnlyForDeploymentPostprocessing = 0;
22-
};
23-
/* End PBXCopyFilesBuildPhase section */
24-
2513
/* Begin PBXFileReference section */
2614
134814201AA4EA6300B7C361 /* libRCTActionSheet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTActionSheet.a; sourceTree = BUILT_PRODUCTS_DIR; };
27-
14C644C11AB0DFC900DE3C65 /* RCTActionSheetManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTActionSheetManager.h; sourceTree = "<group>"; };
15+
14C644C11AB0DFC900DE3C65 /* RCTActionSheetManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RCTActionSheetManager.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
2816
14C644C21AB0DFC900DE3C65 /* RCTActionSheetManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTActionSheetManager.m; sourceTree = "<group>"; };
2917
/* End PBXFileReference section */
3018

31-
/* Begin PBXFrameworksBuildPhase section */
32-
58B511D81A9E6C8500147676 /* Frameworks */ = {
33-
isa = PBXFrameworksBuildPhase;
34-
buildActionMask = 2147483647;
35-
files = (
36-
);
37-
runOnlyForDeploymentPostprocessing = 0;
38-
};
39-
/* End PBXFrameworksBuildPhase section */
40-
4119
/* Begin PBXGroup section */
4220
134814211AA4EA7D00B7C361 /* Products */ = {
4321
isa = PBXGroup;
@@ -66,8 +44,6 @@
6644
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTActionSheet" */;
6745
buildPhases = (
6846
58B511D71A9E6C8500147676 /* Sources */,
69-
58B511D81A9E6C8500147676 /* Frameworks */,
70-
58B511D91A9E6C8500147676 /* CopyFiles */,
7147
);
7248
buildRules = (
7349
);
@@ -156,10 +132,7 @@
156132
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
157133
GCC_WARN_UNUSED_FUNCTION = YES;
158134
GCC_WARN_UNUSED_VARIABLE = YES;
159-
HEADER_SEARCH_PATHS = (
160-
"$(SRCROOT)/../../React/**",
161-
"$(SRCROOT)/../../ReactCommon/**",
162-
);
135+
HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/usr/local/include";
163136
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
164137
MTL_ENABLE_DEBUG_INFO = YES;
165138
ONLY_ACTIVE_ARCH = YES;
@@ -200,10 +173,7 @@
200173
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
201174
GCC_WARN_UNUSED_FUNCTION = YES;
202175
GCC_WARN_UNUSED_VARIABLE = YES;
203-
HEADER_SEARCH_PATHS = (
204-
"$(SRCROOT)/../../React/**",
205-
"$(SRCROOT)/../../ReactCommon/**",
206-
);
176+
HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/usr/local/include";
207177
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
208178
MTL_ENABLE_DEBUG_INFO = NO;
209179
SDKROOT = iphoneos;

Libraries/ActionSheetIOS/RCTActionSheetManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#import <UIKit/UIKit.h>
1111

12-
#import "RCTBridge.h"
12+
#import <React/RCTBridge.h>
1313

1414
@interface RCTActionSheetManager : NSObject <RCTBridgeModule>
1515

Libraries/ActionSheetIOS/RCTActionSheetManager.m

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
#import "RCTActionSheetManager.h"
1111

12-
#import "RCTConvert.h"
13-
#import "RCTLog.h"
14-
#import "RCTUtils.h"
15-
#import "RCTBridge.h"
16-
#import "RCTUIManager.h"
12+
#import <React/RCTBridge.h>
13+
#import <React/RCTConvert.h>
14+
#import <React/RCTLog.h>
15+
#import <React/RCTUIManager.h>
16+
#import <React/RCTUtils.h>
1717

1818
@interface RCTActionSheetManager () <UIActionSheetDelegate>
1919
@end

0 commit comments

Comments
 (0)