Permalink
Browse files

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
  • Loading branch information...
1 parent 5850165 commit e1577df1fd70049ce7f288f91f6e2b18d512ff4d @javache javache committed with Facebook Github Bot Nov 23, 2016
Showing with 1,492 additions and 1,197 deletions.
  1. +33 −28 Examples/UIExplorer/UIExplorer.xcodeproj/project.pbxproj
  2. +1 −1 Examples/UIExplorer/UIExplorer.xcodeproj/xcshareddata/xcschemes/UIExplorer-tvOS.xcscheme
  3. +16 −2 Examples/UIExplorer/UIExplorer.xcodeproj/xcshareddata/xcschemes/UIExplorer.xcscheme
  4. +7 −6 Examples/UIExplorer/UIExplorer/AppDelegate.m
  5. +2 −1 Examples/UIExplorer/UIExplorer/NativeExampleViews/FlexibleSizeExampleView.h
  6. +7 −8 Examples/UIExplorer/UIExplorer/NativeExampleViews/FlexibleSizeExampleView.m
  7. +2 −1 Examples/UIExplorer/UIExplorer/NativeExampleViews/UpdatePropertiesExampleView.h
  8. +5 −6 Examples/UIExplorer/UIExplorer/NativeExampleViews/UpdatePropertiesExampleView.m
  9. +1 −4 Examples/UIExplorer/UIExplorerUnitTests/OCMock/OCMStubRecorder.h
  10. +2 −1 Examples/UIExplorer/UIExplorerUnitTests/RCTConvert_NSURLTests.m
  11. +1 −1 Examples/UIExplorer/UIExplorerUnitTests/RCTImageLoaderHelpers.h
  12. +3 −33 Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj/project.pbxproj
  13. +1 −1 Libraries/ActionSheetIOS/RCTActionSheetManager.h
  14. +5 −5 Libraries/ActionSheetIOS/RCTActionSheetManager.m
  15. +1 −1 Libraries/AdSupport/RCTAdSupport.h
  16. +3 −2 Libraries/AdSupport/RCTAdSupport.m
  17. +3 −9 Libraries/AdSupport/RCTAdSupport.xcodeproj/project.pbxproj
  18. +2 −2 Libraries/CameraRoll/RCTAssetsLibraryRequestHandler.h
  19. +4 −5 Libraries/CameraRoll/RCTAssetsLibraryRequestHandler.m
  20. +6 −14 Libraries/CameraRoll/RCTCameraRoll.xcodeproj/project.pbxproj
  21. +2 −2 Libraries/CameraRoll/RCTCameraRollManager.h
  22. +8 −7 Libraries/CameraRoll/RCTCameraRollManager.m
  23. +1 −1 Libraries/CameraRoll/RCTImagePickerManager.h
  24. +7 −8 Libraries/CameraRoll/RCTImagePickerManager.m
  25. +1 −1 Libraries/CameraRoll/RCTPhotoLibraryImageLoader.h
  26. +1 −2 Libraries/CameraRoll/RCTPhotoLibraryImageLoader.m
  27. +3 −33 Libraries/Geolocation/RCTGeolocation.xcodeproj/project.pbxproj
  28. +1 −1 Libraries/Geolocation/RCTLocationObserver.h
  29. +6 −6 Libraries/Geolocation/RCTLocationObserver.m
  30. +1 −1 Libraries/Image/RCTGIFImageDecoder.h
  31. +1 −1 Libraries/Image/RCTGIFImageDecoder.m
  32. +39 −72 Libraries/Image/RCTImage.xcodeproj/project.pbxproj
  33. +1 −1 Libraries/Image/RCTImageBlurUtils.h
  34. +1 −1 Libraries/Image/RCTImageCache.h
  35. +6 −6 Libraries/Image/RCTImageCache.m
  36. +1 −1 Libraries/Image/RCTImageEditingManager.h
  37. +5 −5 Libraries/Image/RCTImageEditingManager.m
  38. +3 −3 Libraries/Image/RCTImageLoader.h
  39. +8 −9 Libraries/Image/RCTImageLoader.m
  40. +2 −2 Libraries/Image/RCTImageStoreManager.h
  41. +6 −4 Libraries/Image/RCTImageStoreManager.m
  42. +2 −2 Libraries/Image/RCTImageUtils.h
  43. +4 −3 Libraries/Image/RCTImageUtils.m
  44. +2 −1 Libraries/Image/RCTImageView.h
  45. +8 −8 Libraries/Image/RCTImageView.m
  46. +1 −1 Libraries/Image/RCTImageViewManager.h
  47. +3 −2 Libraries/Image/RCTImageViewManager.m
  48. +1 −1 Libraries/Image/RCTLocalAssetImageLoader.h
  49. +1 −1 Libraries/Image/RCTLocalAssetImageLoader.m
  50. +1 −1 Libraries/Image/RCTResizeMode.h
  51. +2 −50 Libraries/LinkingIOS/RCTLinking.xcodeproj/project.pbxproj
  52. +1 −1 Libraries/LinkingIOS/RCTLinkingManager.h
  53. +3 −3 Libraries/LinkingIOS/RCTLinkingManager.m
  54. +2 −1 Libraries/NativeAnimation/Drivers/RCTAnimationDriver.h
  55. +1 −2 Libraries/NativeAnimation/Drivers/RCTEventAnimation.h
  56. +3 −2 Libraries/NativeAnimation/Drivers/RCTFrameAnimation.m
  57. +3 −2 Libraries/NativeAnimation/Drivers/RCTSpringAnimation.m
  58. +1 −1 Libraries/NativeAnimation/Nodes/RCTAnimatedNode.m
  59. +3 −2 Libraries/NativeAnimation/Nodes/RCTDiffClampAnimatedNode.m
  60. +2 −1 Libraries/NativeAnimation/Nodes/RCTDivisionAnimatedNode.m
  61. +2 −1 Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.h
  62. +18 −66 Libraries/NativeAnimation/RCTAnimation.xcodeproj/project.pbxproj
  63. +5 −5 Libraries/NativeAnimation/RCTAnimationUtils.h
  64. +1 −1 Libraries/NativeAnimation/RCTAnimationUtils.m
  65. +4 −3 Libraries/NativeAnimation/RCTNativeAnimatedModule.h
  66. +14 −13 Libraries/NativeAnimation/RCTNativeAnimatedModule.m
  67. +4 −3 Libraries/NativeAnimation/RCTViewPropertyMapper.m
  68. +2 −2 Libraries/Network/RCTDataRequestHandler.h
  69. +2 −2 Libraries/Network/RCTFileRequestHandler.h
  70. +1 −1 Libraries/Network/RCTFileRequestHandler.m
  71. +2 −2 Libraries/Network/RCTHTTPRequestHandler.h
  72. +1 −1 Libraries/Network/RCTNetInfo.h
  73. +3 −3 Libraries/Network/RCTNetInfo.m
  74. +13 −54 Libraries/Network/RCTNetwork.xcodeproj/project.pbxproj
  75. +2 −2 Libraries/Network/RCTNetworkTask.h
  76. +3 −4 Libraries/Network/RCTNetworkTask.m
  77. +2 −2 Libraries/Network/RCTNetworking.h
  78. +30 −29 Libraries/Network/RCTNetworking.mm
  79. +15 −106 Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj/project.pbxproj
  80. +1 −1 Libraries/PushNotificationIOS/RCTPushNotificationManager.h
  81. +6 −6 Libraries/PushNotificationIOS/RCTPushNotificationManager.m
  82. +1 −1 Libraries/RCTTest/RCTSnapshotManager.h
  83. +2 −8 Libraries/RCTTest/RCTTest.xcodeproj/project.pbxproj
  84. +2 −2 Libraries/RCTTest/RCTTestModule.h
  85. +5 −4 Libraries/RCTTest/RCTTestModule.m
  86. +6 −5 Libraries/RCTTest/RCTTestRunner.m
  87. +2 −50 Libraries/Settings/RCTSettings.xcodeproj/project.pbxproj
  88. +1 −1 Libraries/Settings/RCTSettingsManager.h
  89. +4 −4 Libraries/Settings/RCTSettingsManager.m
  90. +1 −1 Libraries/Text/RCTRawTextManager.h
  91. +1 −1 Libraries/Text/RCTShadowRawText.h
  92. +1 −1 Libraries/Text/RCTShadowRawText.m
  93. +2 −2 Libraries/Text/RCTShadowText.h
  94. +8 −7 Libraries/Text/RCTShadowText.m
  95. +3 −2 Libraries/Text/RCTText.m
  96. +2 −50 Libraries/Text/RCTText.xcodeproj/project.pbxproj
  97. +1 −1 Libraries/Text/RCTTextField.h
  98. +5 −4 Libraries/Text/RCTTextField.m
  99. +1 −2 Libraries/Text/RCTTextFieldManager.h
  100. +4 −3 Libraries/Text/RCTTextFieldManager.m
  101. +1 −1 Libraries/Text/RCTTextManager.h
  102. +5 −5 Libraries/Text/RCTTextManager.m
  103. +1 −1 Libraries/Text/RCTTextSelection.h
  104. +2 −2 Libraries/Text/RCTTextView.h
  105. +5 −4 Libraries/Text/RCTTextView.m
  106. +1 −1 Libraries/Text/RCTTextViewManager.h
  107. +5 −4 Libraries/Text/RCTTextViewManager.m
  108. +1 −1 Libraries/Vibration/RCTVibration.h
  109. +2 −32 Libraries/Vibration/RCTVibration.xcodeproj/project.pbxproj
  110. +2 −3 Libraries/WebSocket/RCTSRWebSocket.m
  111. +2 −40 Libraries/WebSocket/RCTWebSocket.xcodeproj/project.pbxproj
  112. +2 −3 Libraries/WebSocket/RCTWebSocketExecutor.h
  113. +7 −7 Libraries/WebSocket/RCTWebSocketExecutor.m
  114. +2 −3 Libraries/WebSocket/RCTWebSocketManager.h
  115. +7 −7 Libraries/WebSocket/RCTWebSocketManager.m
  116. +2 −3 Libraries/WebSocket/RCTWebSocketModule.h
  117. +8 −2 Libraries/WebSocket/RCTWebSocketModule.m
  118. +1 −1 React/Base/RCTAssert.h
  119. +3 −3 React/Base/RCTBatchedBridge.m
  120. +1 −1 React/Base/RCTBridge+Private.h
  121. +5 −5 React/Base/RCTBridge.h
  122. +1 −1 React/Base/RCTBridgeDelegate.h
  123. +2 −2 React/Base/RCTBridgeModule.h
  124. +2 −1 React/Base/RCTBundleURLProvider.m
  125. +6 −7 React/Base/RCTConvert.h
  126. +2 −2 React/Base/RCTConvert.m
  127. +1 −1 React/Base/RCTEventDispatcher.h
  128. +1 −1 React/Base/RCTImageSource.h
  129. +2 −2 React/Base/RCTJavaScriptExecutor.h
  130. +1 −1 React/Base/RCTJavaScriptLoader.h
  131. +2 −2 React/Base/RCTLog.h
  132. +1 −1 React/Base/RCTModuleData.h
  133. +2 −2 React/Base/RCTModuleMethod.h
  134. +2 −2 React/Base/RCTModuleMethod.m
  135. +2 −1 React/Base/RCTMultipartDataTask.h
  136. +1 −1 React/Base/RCTParserUtils.h
  137. +1 −1 React/Base/RCTPlatform.h
  138. +1 −1 React/Base/RCTRootView.h
  139. +1 −1 React/Base/RCTRootViewInternal.h
  140. +1 −1 React/Base/RCTTouchEvent.h
  141. +1 −1 React/Base/RCTTouchHandler.h
  142. +2 −2 React/Base/RCTURLRequestHandler.h
  143. +2 −2 React/Base/RCTUtils.h
  144. +3 −4 React/Base/RCTWebSocketProxy.h
  145. +1 −1 React/Base/RCTWebSocketProxyDelegate.h
  146. +1 −1 React/Executors/RCTJSCErrorHandling.h
  147. +1 −1 React/Executors/RCTJSCExecutor.h
  148. +5 −5 React/Executors/RCTJSCExecutor.mm
  149. +1 −1 React/Modules/JSCSamplingProfiler.h
  150. +2 −2 React/Modules/RCTAccessibilityManager.h
  151. +2 −2 React/Modules/RCTAlertManager.h
  152. +1 −1 React/Modules/RCTAppState.h
  153. +2 −2 React/Modules/RCTAsyncLocalStorage.h
  154. +1 −1 React/Modules/RCTClipboard.h
  155. +1 −1 React/Modules/RCTDevLoadingView.h
  156. +2 −2 React/Modules/RCTDevMenu.h
  157. +1 −1 React/Modules/RCTEventEmitter.h
  158. +1 −1 React/Modules/RCTExceptionsManager.h
  159. +1 −1 React/Modules/RCTI18nManager.h
  160. +1 −1 React/Modules/RCTKeyboardObserver.h
  161. +3 −3 React/Modules/RCTRedBox.h
  162. +1 −1 React/Modules/RCTRedBox.m
  163. +1 −1 React/Modules/RCTSourceCode.h
  164. +2 −2 React/Modules/RCTStatusBarManager.h
  165. +3 −3 React/Modules/RCTTiming.h
  166. +5 −5 React/Modules/RCTUIManager.h
  167. +1 −1 React/Modules/RCTUIManager.m
  168. +1 −1 React/Profiler/RCTFPSGraph.h
  169. +1 −1 React/Profiler/RCTJSCProfiler.h
  170. +2 −2 React/Profiler/RCTProfile.h
  171. +808 −51 React/React.xcodeproj/project.pbxproj
  172. +1 −1 React/Views/RCTActivityIndicatorViewManager.h
  173. +1 −0 React/Views/RCTActivityIndicatorViewManager.m
  174. +1 −1 React/Views/RCTBorderDrawing.h
  175. +3 −3 React/Views/RCTComponentData.h
  176. +1 −1 React/Views/RCTComponentData.m
  177. +1 −1 React/Views/RCTConvert+CoreLocation.h
  178. +1 −1 React/Views/RCTConvert+MapKit.h
  179. +2 −2 React/Views/RCTDatePickerManager.h
  180. +1 −1 React/Views/RCTFont.h
  181. +2 −2 React/Views/RCTMap.h
  182. +1 −1 React/Views/RCTMapManager.h
  183. +3 −3 React/Views/RCTModalHostView.h
  184. +2 −3 React/Views/RCTModalHostViewManager.h
  185. +1 −1 React/Views/RCTNavItem.h
  186. +2 −3 React/Views/RCTNavItemManager.h
  187. +1 −1 React/Views/RCTNavigator.h
  188. +1 −2 React/Views/RCTNavigatorManager.h
  189. +1 −1 React/Views/RCTPicker.h
  190. +1 −1 React/Views/RCTPickerManager.h
  191. +1 −1 React/Views/RCTProgressViewManager.h
  192. +1 −1 React/Views/RCTRefreshControl.h
  193. +1 −1 React/Views/RCTRefreshControlManager.h
  194. +1 −1 React/Views/RCTRootShadowView.h
  195. +4 −4 React/Views/RCTScrollView.h
  196. +4 −3 React/Views/RCTScrollView.m
  197. +2 −2 React/Views/RCTScrollViewManager.h
  198. +1 −1 React/Views/RCTSegmentedControl.h
  199. +1 −1 React/Views/RCTSegmentedControlManager.h
  200. +2 −3 React/Views/RCTShadowView.h
  201. +1 −1 React/Views/RCTShadowView.m
  202. +1 −1 React/Views/RCTSlider.h
  203. +1 −1 React/Views/RCTSliderManager.h
  204. +1 −2 React/Views/RCTSwitch.h
  205. +1 −1 React/Views/RCTSwitchManager.h
  206. +1 −1 React/Views/RCTTabBarItem.h
  207. +1 −1 React/Views/RCTTabBarItemManager.h
  208. +1 −1 React/Views/RCTTabBarManager.h
  209. +4 −5 React/Views/RCTView.h
  210. +6 −6 React/Views/RCTViewManager.h
  211. +1 −1 React/Views/RCTViewManager.m
  212. +1 −1 React/Views/RCTWebView.h
  213. +1 −1 React/Views/RCTWebViewManager.h
  214. +1 −1 React/Views/RCTWrapperViewController.h
  215. +1 −1 React/Views/UIView+React.h
  216. +3 −3 ReactCommon/jschelpers/JSCWrapper.cpp
  217. +2 −10 local-cli/templates/HelloWorld/ios/HelloWorld.xcodeproj/project.pbxproj
  218. +22 −5 local-cli/templates/HelloWorld/ios/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme
  219. +2 −2 local-cli/templates/HelloWorld/ios/HelloWorld/AppDelegate.m
  220. +2 −2 local-cli/templates/HelloWorld/ios/HelloWorldTests/HelloWorldTests.m
@@ -87,7 +87,6 @@
2D4BD8E61DA2E20D005AC8A8 /* TestBundle.js in Resources */ = {isa = PBXBuildFile; fileRef = 3DD981D51D33C6FB007DC7BE /* TestBundle.js */; };
2D4BD8E71DA2E20D005AC8A8 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14D6D7101B220EB3001FB087 /* libOCMock.a */; };
2D8C2E321DA40403000EE098 /* RCTMultipartStreamReaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 001BFCE31D838343008E587E /* RCTMultipartStreamReaderTests.m */; };
- 2DD0EFF41DA853B200B0C975 /* libRCTPushNotification-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DD0EFF31DA853B200B0C975 /* libRCTPushNotification-tvOS.a */; };
2DD323DC1DA2DDBF000FE1B8 /* FlexibleSizeExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F441E81BEBE5030039B79C /* FlexibleSizeExampleView.m */; };
2DD323DD1DA2DDBF000FE1B8 /* UpdatePropertiesExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 272E6B3C1BEA849E001FCF37 /* UpdatePropertiesExampleView.m */; };
2DD323DE1DA2DDBF000FE1B8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
@@ -212,13 +211,6 @@
remoteGlobalIDString = 2DD3238F1DA2DD8A000FE1B8;
remoteInfo = "UIExplorer-tvOS";
};
- 2DD0EFF21DA853B200B0C975 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 14DC67E71AB71876001358AB /* RCTPushNotification.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 2DD0EFE61DA8533A00B0C975;
- remoteInfo = "RCTPushNotification-tvOS";
- };
2DD323A61DA2DD8B000FE1B8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
@@ -303,6 +295,20 @@
remoteGlobalIDString = 3D13F83D1D6F6AE000E69E0E;
remoteInfo = UIExplorerBundle;
};
+ 3D3C08801DE3424E00C268FA /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
+ remoteInfo = CSSLayout;
+ };
+ 3D3C08821DE3424E00C268FA /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 14AADEFF1AC3DB95002390C9 /* React.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
+ remoteInfo = "CSSLayout-tvOS";
+ };
58005BED1ABA80530062E044 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 58005BE41ABA80530062E044 /* RCTTest.xcodeproj */;
@@ -438,9 +444,9 @@
13E501F11D07A84A005F35D8 /* libRCTAnimation.a in Frameworks */,
138DEE241B9EDFB6007F4EA5 /* libRCTCameraRoll.a in Frameworks */,
134A8A2A1AACED7A00945AAE /* libRCTGeolocation.a in Frameworks */,
+ 1341802C1AA9178B003F314A /* libRCTNetwork.a in Frameworks */,
13417FE91AA91432003F314A /* libRCTImage.a in Frameworks */,
3578590A1B28D2CF00341EDB /* libRCTLinking.a in Frameworks */,
- 1341802C1AA9178B003F314A /* libRCTNetwork.a in Frameworks */,
14DC67F41AB71881001358AB /* libRCTPushNotification.a in Frameworks */,
834C36EC1AF8DED70019C93C /* libRCTSettings.a in Frameworks */,
134180011AA9153C003F314A /* libRCTText.a in Frameworks */,
@@ -469,7 +475,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 2DD0EFF41DA853B200B0C975 /* libRCTPushNotification-tvOS.a in Frameworks */,
2DD323E31DA2DE3F000FE1B8 /* libRCTAnimation-tvOS.a in Frameworks */,
2DD323E41DA2DE3F000FE1B8 /* libRCTImage-tvOS.a in Frameworks */,
2DD323E51DA2DE3F000FE1B8 /* libRCTLinking-tvOS.a in Frameworks */,
@@ -681,6 +686,8 @@
children = (
14AADF041AC3DB95002390C9 /* libReact.a */,
2DD323D91DA2DD8B000FE1B8 /* libReact-tvOS.a */,
+ 3D3C08811DE3424E00C268FA /* libCSSLayout.a */,
+ 3D3C08831DE3424E00C268FA /* libCSSLayout-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
@@ -712,7 +719,6 @@
isa = PBXGroup;
children = (
14DC67F11AB71876001358AB /* libRCTPushNotification.a */,
- 2DD0EFF31DA853B200B0C975 /* libRCTPushNotification-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
@@ -1134,13 +1140,6 @@
remoteRef = 14DC67F01AB71876001358AB /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- 2DD0EFF31DA853B200B0C975 /* libRCTPushNotification-tvOS.a */ = {
- isa = PBXReferenceProxy;
- fileType = archive.ar;
- path = "libRCTPushNotification-tvOS.a";
- remoteRef = 2DD0EFF21DA853B200B0C975 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
2DD323B51DA2DD8B000FE1B8 /* libRCTAnimation-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -1211,6 +1210,20 @@
remoteRef = 357859001B28D2C500341EDB /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
+ 3D3C08811DE3424E00C268FA /* libCSSLayout.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libCSSLayout.a;
+ remoteRef = 3D3C08801DE3424E00C268FA /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 3D3C08831DE3424E00C268FA /* libCSSLayout-tvOS.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = "libCSSLayout-tvOS.a";
+ remoteRef = 3D3C08821DE3424E00C268FA /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
58005BEE1ABA80530062E044 /* libRCTTest.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -1798,11 +1811,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- "$(SRCROOT)/../../React/**",
- "$(SRCROOT)/../../ReactCommon/**",
- "$(SRCROOT)/../../Libraries/**",
- );
+ HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/usr/local/include";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -1862,11 +1871,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- "$(SRCROOT)/../../React/**",
- "$(SRCROOT)/../../ReactCommon/**",
- "$(SRCROOT)/../../Libraries/**",
- );
+ HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/usr/local/include";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = (
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0800"
+ LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0730"
+ LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
- parallelizeBuildables = "YES"
+ parallelizeBuildables = "NO"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
@@ -14,6 +14,20 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
+ BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
+ BuildableName = "libReact.a"
+ BlueprintName = "React"
+ ReferencedContainer = "container:../../React/React.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
BlueprintIdentifier = "3D13F83D1D6F6AE000E69E0E"
BuildableName = "UIExplorerBundle.bundle"
BlueprintName = "UIExplorerBundle"
@@ -14,13 +14,14 @@
#import "AppDelegate.h"
-#import "RCTBridge.h"
-#import "RCTBundleURLProvider.h"
-#import "RCTJavaScriptLoader.h"
-#import "RCTLinkingManager.h"
-#import "RCTRootView.h"
+#import <React/RCTBridge.h>
+#import <React/RCTBundleURLProvider.h>
+#import <React/RCTJavaScriptLoader.h>
+#import <React/RCTLinkingManager.h>
+#import <React/RCTRootView.h>
+
#if !TARGET_OS_TV
-#import "RCTPushNotificationManager.h"
+#import <React/RCTPushNotificationManager.h>
#endif
@interface AppDelegate() <RCTBridgeDelegate>
@@ -13,7 +13,8 @@
*/
#import <UIKit/UIKit.h>
-#import "RCTView.h"
+
+#import <React/RCTView.h>
@interface FlexibleSizeExampleView : RCTView
@@ -12,15 +12,14 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#import "AppDelegate.h"
-
#import "FlexibleSizeExampleView.h"
-#import "RCTJavaScriptLoader.h"
-#import "RCTBridge.h"
-#import "RCTRootView.h"
-#import "RCTRootViewDelegate.h"
-#import "RCTViewManager.h"
+#import <React/RCTBridge.h>
+#import <React/RCTRootView.h>
+#import <React/RCTRootViewDelegate.h>
+#import <React/RCTViewManager.h>
+
+#import "AppDelegate.h"
@interface FlexibleSizeExampleViewManager : RCTViewManager
@@ -38,7 +37,7 @@ - (UIView *)view
@end
-@interface FlexibleSizeExampleView ()<RCTRootViewDelegate>
+@interface FlexibleSizeExampleView () <RCTRootViewDelegate>
@end
@@ -13,7 +13,8 @@
*/
#import <UIKit/UIKit.h>
-#import "RCTView.h"
+
+#import <React/RCTView.h>
@interface UpdatePropertiesExampleView : RCTView
@@ -12,13 +12,12 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#import "AppDelegate.h"
-
#import "UpdatePropertiesExampleView.h"
-#import "RCTJavaScriptLoader.h"
-#import "RCTBridge.h"
-#import "RCTRootView.h"
-#import "RCTViewManager.h"
+
+#import <React/RCTRootView.h>
+#import <React/RCTViewManager.h>
+
+#import "AppDelegate.h"
@interface UpdatePropertiesExampleViewManager : RCTViewManager
@@ -14,7 +14,7 @@
* under the License.
*/
-#import "OCMRecorder.h"
+#import <React/OCMRecorder.h>
@interface OCMStubRecorder : OCMRecorder
@@ -51,6 +51,3 @@
@property (nonatomic, readonly) OCMStubRecorder *(^ _andForwardToRealObject)(void);
@end
-
-
-
@@ -14,7 +14,8 @@
#import <XCTest/XCTest.h>
-#import "RCTConvert.h"
+#import <React/RCTConvert.h>
+
#import "RCTUtils.h"
@interface RCTConvert_NSURLTests : XCTestCase
@@ -12,7 +12,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#import "RCTImageLoader.h"
+#import <React/RCTImageLoader.h>
typedef BOOL (^RCTImageURLLoaderCanLoadImageURLHandler)(NSURL *requestURL);
typedef RCTImageLoaderCancellationBlock (^RCTImageURLLoaderLoadImageURLHandler)(NSURL *imageURL, CGSize size, CGFloat scale, RCTResizeMode resizeMode, RCTImageLoaderProgressBlock progressHandler, RCTImageLoaderCompletionBlock completionHandler);
@@ -10,34 +10,12 @@
14C644C41AB0DFC900DE3C65 /* RCTActionSheetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 14C644C21AB0DFC900DE3C65 /* RCTActionSheetManager.m */; };
/* End PBXBuildFile section */
-/* Begin PBXCopyFilesBuildPhase section */
- 58B511D91A9E6C8500147676 /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "include/$(PRODUCT_NAME)";
- dstSubfolderSpec = 16;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
/* Begin PBXFileReference section */
134814201AA4EA6300B7C361 /* libRCTActionSheet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTActionSheet.a; sourceTree = BUILT_PRODUCTS_DIR; };
- 14C644C11AB0DFC900DE3C65 /* RCTActionSheetManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTActionSheetManager.h; sourceTree = "<group>"; };
+ 14C644C11AB0DFC900DE3C65 /* RCTActionSheetManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RCTActionSheetManager.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
14C644C21AB0DFC900DE3C65 /* RCTActionSheetManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTActionSheetManager.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
-/* Begin PBXFrameworksBuildPhase section */
- 58B511D81A9E6C8500147676 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
/* Begin PBXGroup section */
134814211AA4EA7D00B7C361 /* Products */ = {
isa = PBXGroup;
@@ -66,8 +44,6 @@
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTActionSheet" */;
buildPhases = (
58B511D71A9E6C8500147676 /* Sources */,
- 58B511D81A9E6C8500147676 /* Frameworks */,
- 58B511D91A9E6C8500147676 /* CopyFiles */,
);
buildRules = (
);
@@ -156,10 +132,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- "$(SRCROOT)/../../React/**",
- "$(SRCROOT)/../../ReactCommon/**",
- );
+ HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/usr/local/include";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -200,10 +173,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- "$(SRCROOT)/../../React/**",
- "$(SRCROOT)/../../ReactCommon/**",
- );
+ HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/usr/local/include";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
-#import "RCTBridge.h"
+#import <React/RCTBridge.h>
@interface RCTActionSheetManager : NSObject <RCTBridgeModule>
Oops, something went wrong.

31 comments on commit e1577df

@rturk
rturk commented on e1577df Dec 1, 2016

@javache For clarify maybe headers should be prefixed with ReactNative instead of just React

@janicduplessis
Member

@javache I'm having some issues with building an archive in xcode after updating past this commit. Updated HEADER_SEARCH_PATHS to $(BUILT_PRODUCTS_DIR)/usr/local/include and everything works fine when running with either debug or release scheme (so it's not a scheme issue). However when building an archive to upload on the app store I get header not found errors. After looking a bit I found that xcode uses a different folder structure when archiving and adding "$(BUILD_ROOT)/../InstallationBuildProductsLocation/usr/local/include" to the paths does fix it but kind of feels like a fragile solution. Found a bunch of different solutions on SO that all didn't work probably due to different xcode versions so I ended looking at the build dir to figure out the right path. Any ideas on a better solution? If not I guess we should add this to the header include paths so it doesn't break archive generation.

@nihgwu
Contributor
nihgwu commented on e1577df Dec 5, 2016

@javache @janicduplessis I've been in a battle trying to build after upgrade to RN0.40, as this commit breaks all the third-party libraries, got errors such as can't find React/RCTXXX.h blablabla , and I ended up to add $(BUILT_PRODUCTS_DIR)/usr/local/include to the HEADER_SEARCH_PATHS of every third-party library, I think it's wired to make such a big change with building settings, I haven't try to archive, and I believe I will encounter with the issue janic said above

So, are there more clever solution?

@janicduplessis
Member

There is also another issue, headers get included in the archive so it cannot get uploaded to the store as an iOS app. Looks like the recommended solution for this is to use a copy files build phase instead of headers build phase but I couldn't get it working so I ended using a pre-archive script to manually delete the headers from the archive. I added rm -rf "${OBJROOT}/../InstallationBuildProductsLocation/usr" in edit scheme -> archive section -> pre-archive -> add script.

@javache
Member
javache commented on e1577df Dec 5, 2016

Hmm, I'll try what happens when I do a production build of UIExplorer, but I'm really surprised the copy headers phase is not behaving correctly like that.

@javache
Member
javache commented on e1577df Dec 5, 2016

@nihgwu: none of the headers inside React moved locations, so I'm wondering why this would cause 3rd party packages with existing header include paths to break. I'd appreciate any help since this xcode config is very frustrating, internally we just use Buck.

@javache
Member
javache commented on e1577df Dec 5, 2016

$(DSTROOT)/usr/local/include seems to be the correct path when archiving, but not when doing regular builds...

@janicduplessis
Member

@javache Yeah, from what I read the archive process has a different folder structure -_-, I guess we could include both paths. Also from your previous comment I don't think this change is backwards compatible, I don't know enough about xcode build stuff to know why (I agree it's weird since headers didn't move) but they are not accesible anymore with the old include path so every single lib need to update both their header include path and every import to <React/...>.

Once you manage to generate an archive you will also probably hit the 2nd issue I mentionned because the headers get included in the archive so it cannot be published as an app...

How does this improve builds internally? Is it worth breaking all 3rd party libs and having to work through these issues? I was starting to consider if we should rather just revert this at least until we can have a better solution.

@javache
Member
javache commented on e1577df Dec 6, 2016

Hmm, yeah, I see how this could break 3rd party libs. Besides reverting this commit, are there any other options that could limit the impact this has?

We do need this internally to have RN behave will with the rest of our build tooling. Having imports as "..." means you're filling the global namespace with RN header references which we had to move away from.

For the xcarchive containing headers issue, I'm now trying https://developer.apple.com/library/content/technotes/tn2215/_index.html as "Headers build phases do not work correctly with static library targets when archiving in Xcode"

@janicduplessis
Member

I see, I'm fine with keeping this as no matter the change we make to avoid polluting the global header namespace it will break 3rd party libs. At least it's a simple fix for library authors.

I also tried using copy files build phase as mentioned in this article but couldn't get it working and gave up since I had to ship a build asap :)

@chirag04
Contributor

@javache This is affecting us badly too. Is there a short term fix? and should we ask 3rd party libs to update their imports/headers?

@javache
Member
javache commented on e1577df Dec 7, 2016

3rd parties should only need to update their header search path. I'm working on fixing the setup for archiving builds.

@nihgwu
Contributor
nihgwu commented on e1577df Dec 7, 2016

@javache not only the header search path, if you need to import the header files from the 3rd party libraries in AppDelegate.m, you will still get errors, you have to change $(BUILT_PRODUCTS_DIR)/usr/local/include to be recursive in your project targets as those libraries are importing "RCTXXX.h" not <React/RCTXXX.h>

So the best way is to update their header search path and import path both

@javache
Member
javache commented on e1577df Dec 7, 2016

Correct. I'll be landing a change today (and picking it to 0.40), which moves the exported headers to $(BUILT_PRODUCTS_DIR)/include which actually is on Xcode's default include path it seems, so no changes should be required anymore.

@nihgwu
Contributor
nihgwu commented on e1577df Dec 7, 2016

Good news, I'm really frustrating with the XCode stuff.

@javache
Member
javache commented on e1577df Dec 7, 2016

A new version of this just landed as 59407f3 Can you try it out? @mkonicek will be merging this in v0.40 if all goes well.

@janicduplessis
Member
janicduplessis commented on e1577df Dec 8, 2016 edited

@javache Just tested and it works really well, thanks for figuring out this frustrating xcode build stuff. Third party libs will still have to update their RN imports and remove React from their headers path otherwise you get header redefinition errors but I think this is fine.

@janicduplessis
Member
janicduplessis commented on e1577df Dec 8, 2016 edited

Actually headers still get included in the archive, looks like they need to be in the 'Project' section instead of 'Private' (as if that makes any sense). After changing that it works properly :)

@nihgwu
Contributor
nihgwu commented on e1577df Dec 8, 2016

@javache 59407f3 seems does't solve the 3rd party libraries's search issue, and this commit included CSSLayout->yoga, can't be cherry-picked in v0.40 directly

@nihgwu
Contributor
nihgwu commented on e1577df Dec 8, 2016

didn't see janic's comment when I commented above, I have to say that frustrated me so and I don't want to make another try, I'll try janic's solution mentioned earlier.

@janicduplessis
Member

Made the changes that were needed to be able to archive my app here #11395

@nihgwu
Contributor
nihgwu commented on e1577df Dec 10, 2016

@janicduplessis We still need to update the header paths in 3rd party libs, do we? I'll try it later.

@janicduplessis
Member

Yes I don't think there is a way to make this change and not have libs update their headers.

@nihgwu
Contributor
nihgwu commented on e1577df Dec 10, 2016

So this is another frustrating change for developers just like 0.26 or 0.29 😞

@sjmueller
Contributor

Has anyone tested this yet in a swift project? I removed the following from header search paths:

"../node_modules/react-native/React/**",
"../node_modules/react-native/ReactCommon/**",
"../node_modules/react-native/Libraries/**"

Then added $(BUILT_PRODUCTS_DIR)/include/** and still getting tons of errors on both core and 3rd party libs:
image

Please advise...

@nihgwu
Contributor
nihgwu commented on e1577df Dec 10, 2016

@sjmueller You definitely missed something:

  1. You need to build within the commit 59407f3,
  2. You don't need to add $(BUILT_PRODUCTS_DIR)/include/** to the search path as it already in the default search path
  3. If you want to archive, you also need to apply @janicduplessis 's patch

I'll send a patch file and write a tutorial to make those changes

@nihgwu
Contributor
nihgwu commented on e1577df Dec 10, 2016

I've created a patch for RN0.40-stable branch
https://gist.github.com/nihgwu/7d03ca80fc807d5449a6862f2cbf54d8, this patch reverts the CSSLayout -> yoga change which hasn't been shipped to 0.40-stable branch

  1. copy this patch file to the root path of your project
  2. git apply patch.diff
  3. react-native upgrade and react-native link and other upgrade steps
  4. rename all "RCTXXX.h" to <React/RCTXXX.h> in AppDelegate.m and all your 3rd party libs
  5. remove all the React Native related path from the HEADER_SEARCH_PATHS
@sjmueller
Contributor

Really appreciate your prompt response @nihgwu. Before your answer, I decided to switch from RN 0.40 to master, which includes 59407f3 as you mentioned. However, I still received the same errors, both in 3rd party libs and core libs. I believe I also tried many combinations with header search paths, including removal of all entries. To be honest I'm not entirely sure that the inclusion of certain paths would break something anyway.

I could try going back to 0.40 and apply your patch, but is this going to be a better combo than what's in latest master as of 2 hours ago?

I fear that there may be more to the story here, people are struggling with something similar using swift and cocoapods in #9014 (even though my project doesn't use CocoaPods at all). Over a year of working with RN, I've occasionally had to fork a third party lib to change an import statement from using brackets to quotes, probably because ObjC projects weren't hitting the same build exceptions. However, this change proposes that every dependency switch to brackets, and we should make sure it doesn't leave swift projects in a broken state that requires post install scripts to fixup dependencies 😢

@nihgwu
Contributor
nihgwu commented on e1577df Dec 10, 2016

I don't switch to the master version because react-native upgrade doesn't work well on that branch.
And I'm sorry I missed you mention that you are in a swift project, I have no experience on this

@rh389
Contributor
rh389 commented on e1577df Dec 23, 2016 edited

Isn't there a case for adding #ifndef HEADER_H-style guards to React's public headers? That way we wouldn't be forcing third party libs to accommodate this change. It'd be safe for the user's header/library search paths to point to the same headers in multiple ways.

Edit: This seems to work. PR: #11614

@pvinis
pvinis commented on e1577df Jan 6, 2017

how is disabling parallelization a good thing? isnt the packager slow enough, now we slow down xcode too? why?

Please sign in to comment.