mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Include CSSLayout.h consistently with other project includes
Summary: Include CSSLayout headers in the same way as other project headers, ie `#import <CSSLayout/CSSLayout.h>` becomes `#import "CSSLayout.h"`. CSSLayout is not a framework or system dependency, so shouldn't (AFAIK) be included with angle brackets. Doing so breaks framework builds, such as when RN is used as a pod in a swift project. In combination with https://github.com/facebook/css-layout/pull/217 this fixes https://github.com/facebook/react-native/issues/9014 (specifically swift cocoapods projects). There is then no need for a separate CSSLayout pod subspec. Tests run on the RN project in isolation (with changes inside `CSSLayout` itself also applied) and against a dummy swift project with RN included as a pod. NB: This effectively reverts https://github.com/facebook/react-native/pull/9015 and may break non-swift cocoapods projects unless https://github.com/facebook/css-layout/pull/217 is merged and synced first. Update: As discussed with alloy and emilsjolander, wrap these imports in a preprocess Closes https://github.com/facebook/react-native/pull/9544 Differential Revision: D3821791 Pulled By: javache fbshipit-source-id: d27ac8be9ce560d03479b43d3db740cd196c24da
This commit is contained in:
committed by
Facebook Github Bot 2
parent
4647b62f4d
commit
6e216d2034
@@ -10,7 +10,13 @@
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//Internally we reference a separate library. See https://github.com/facebook/react-native/pull/9544
|
||||
#if __has_include(<CSSLayout/CSSLayout.h>)
|
||||
#import <CSSLayout/CSSLayout.h>
|
||||
#else
|
||||
#import "CSSLayout.h"
|
||||
#endif
|
||||
|
||||
#import "RCTAnimationType.h"
|
||||
#import "RCTBorderStyle.h"
|
||||
#import "RCTTextDecorationLineType.h"
|
||||
|
||||
Reference in New Issue
Block a user